On Jul 21, 2009, at 6:39 PM, Alvaro Herrera wrote:
> Alexey Klyukin wrote:
>> Attached is a patch (HEAD) that sets errcontext with PL/Perl function
>> name, making a distinction between compilation and execution stages,
>> fixes error messages where function name was already included in the
>> message itself and updates regression tests. I'll appreciate any
>> suggestions on how to improve it.
> Hmm, in plperl_exec_callback(), does the global variable work if you
> call one plperl function from another?
PL/Perl functions can't call each other directly. I don't see any
problems with SPI calls:
test=# create function perl_log1() returns void language plperl as $$
test$# elog(NOTICE, "Test from function one");
test=# create function perl_log2() returns void language plperl as $
(NOTICE, "Test from function two");
my $rv = spi_exec_query('SELECT * FROM perl_log1()');
test=# select perl_log2();
NOTICE: Test from function two
CONTEXT: PL/Perl function "perl_log2"
NOTICE: Test from function one
CONTEXT: PL/Perl function "perl_log1"
SQL statement "SELECT * FROM perl_log1()"
PL/Perl function "perl_log1"
Alexey Klyukin http://www.CommandPrompt.com
The PostgreSQL Company - Command Prompt, Inc.
In response to
pgsql-hackers by date
|Next:||From: Alvaro Herrera||Date: 2009-07-21 16:17:14|
|Subject: Re: git revisited|
|Previous:||From: Tom Lane||Date: 2009-07-21 16:07:06|
|Subject: Re: [PATCH v4] Avoid manual shift-and-test logic in AllocSetFreeIndex |