Re: plperl arginfo

From: "Stephen J(dot) Butler" <stephen(dot)butler(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: plperl arginfo
Date: 2010-10-28 16:55:48
Message-ID: AANLkTi=mktYXSZ+RUh6uE3ABKjqzanc1HPgq6xNenGHc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 28, 2010 at 11:34 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> On 10/28/2010 11:54 AM, Pavel Stehule wrote:
>>> Alternatively, maybe the feature could be exposed in a way where you
>>> don't actually calculate the values unless requested, ie provide some
>>> sort of inquiry function instead of always precomputing a hash.
>>> +1 .. some like get_function_info()
>
>> Yeah, that looks doable.
>
> BTW, maybe we could have the best of both worlds?  Dunno about Perl,
> but in some languages it would be possible to instantiate the hash
> only if it's actually touched.  Passing the data as a hash definitely
> seems to fit with the spirit of things otherwise, so as long as it
> didn't cost cycles when not needed, I'd be in favor of that API.

Perl has the tie interface (perldoc perltie) which lets you tie a hash
to an object instance, which implements subs to handle the various
hash operations.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ben 2010-10-28 16:57:49 contsel and gist
Previous Message Merlin Moncure 2010-10-28 16:41:22 Re: revision of todo: NULL for ROW variables