From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
---|---|
To: | Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: PostgreSQL::PLPerl::Call - Simple interface for calling SQL functions from PostgreSQL PL/Perl |
Date: | 2010-02-13 22:25:48 |
Message-ID: | 4EA17200-BC13-405A-888F-EAD995D1BCF2@kineticode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Feb 12, 2010, at 3:10 PM, Tim Bunce wrote:
> I've appended the POD documentation and attached the (rough but working)
> test script.
>
> I plan to release the module to CPAN in the next week or so.
>
> I'd greatly appreciate any feedback.
I like the idea overall, and anything that can simplify the interface is more than welcome. However:
* I'd rather not have to specify a signature for a non-polymorphic function.
* I'd like to be able to use Perl code to call the functions as discussed
previously, something like:
my $count_sql = SP->tl_activity_stats_sql(
[ statistic => $stat, person_id => $pid ],
$debug
);
For a Polymorphic function, perhaps it could be something like:
my $count = SP->call(
tl_activity_stats_sql => [qw(text[] int)],
[ statistic => $stat, person_id => $pid ],
$debug
);
The advantage here is that I'm not writing functions inside strings, and only provide the signature when I need to disambiguate between polymorphic variants.
Anyway, That's just interface arguing. The overall idea is sound and very much appreciated.
Best,
David
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2010-02-13 22:38:29 | Re: Package namespace and Safe init cleanup for plperl [PATCH] |
Previous Message | Andres Freund | 2010-02-13 21:37:41 | idle in txn query cancellation |