Re: [HACKERS] plperl arginfo

2010-10-28 Thread Andrew Dunstan
On 10/28/2010 02:11 PM, Garick Hamlin wrote: On Thu, Oct 28, 2010 at 01:03:24PM -0400, Andrew Dunstan wrote: On 10/28/2010 12:34 PM, Tom Lane wrote: 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

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Garick Hamlin
On Thu, Oct 28, 2010 at 01:03:24PM -0400, Andrew Dunstan wrote: > > > On 10/28/2010 12:34 PM, Tom Lane wrote: > > > > 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. Pas

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Andrew Dunstan
On 10/28/2010 12:34 PM, Tom Lane wrote: 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

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Stephen J. Butler
On Thu, Oct 28, 2010 at 11:34 AM, Tom Lane wrote: > Andrew Dunstan 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 functio

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Pavel Stehule
2010/10/28 Andrew Dunstan : > > > 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

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Tom Lane
Andrew Dunstan 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 li

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Andrew Dunstan
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, th

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Pavel Stehule
2010/10/28 Tom Lane : > Andrew Dunstan writes: >>   While we were discussing allowing generic record type arguments to >> plperl functions, Tom suggested that we should expose the type >> information about the record members to plperl. I think if we do that we >> should probably expand it somewhat

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Pavel Stehule
2010/10/28 Andrew Dunstan : > While we were discussing allowing generic record type arguments to plperl > functions, Tom suggested that we should expose the type information about > the record members to plperl. I think if we do that we should probably > expand it somewhat to all arguments, so that

Re: [HACKERS] plperl arginfo

2010-10-28 Thread Tom Lane
Andrew Dunstan writes: > While we were discussing allowing generic record type arguments to > plperl functions, Tom suggested that we should expose the type > information about the record members to plperl. I think if we do that we > should probably expand it somewhat to all arguments, so tha

[HACKERS] plperl arginfo

2010-10-28 Thread Andrew Dunstan
While we were discussing allowing generic record type arguments to plperl functions, Tom suggested that we should expose the type information about the record members to plperl. I think if we do that we should probably expand it somewhat to all arguments, so that for non-trigger functions, we'