Re: PostgreSQL::PLPerl::Call - Simple interface for calling SQL functions from PostgreSQL PL/Perl
| От | David E. Wheeler |
|---|---|
| Тема | Re: PostgreSQL::PLPerl::Call - Simple interface for calling SQL functions from PostgreSQL PL/Perl |
| Дата | |
| Msg-id | 4EA17200-BC13-405A-888F-EAD995D1BCF2@kineticode.com обсуждение исходный текст |
| Ответ на | PostgreSQL::PLPerl::Call - Simple interface for calling SQL functions from PostgreSQL PL/Perl (Tim Bunce <Tim.Bunce@pobox.com>) |
| Ответы |
Re: PostgreSQL::PLPerl::Call - Simple interface for
calling SQL functions from PostgreSQL PL/Perl
|
| Список | 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
disambiguatebetween polymorphic variants.
Anyway, That's just interface arguing. The overall idea is sound and very much appreciated.
Best,
David
В списке pgsql-hackers по дате отправления: