On Jul 21, 2009, at 7:47 PM, Alexey Klyukin wrote:


On Jul 21, 2009, at 7:20 PM, Alvaro Herrera wrote:

Alexey Klyukin wrote:

NOTICE:  Test from function one
CONTEXT:  PL/Perl function "perl_log1"
SQL statement "SELECT * FROM perl_log1()"
PL/Perl function "perl_log1"

Shouldn't the second "PL/Perl function" line say perl_log2 instead?

Hm, yeah, seems to be a problem. I'll change the callback to avoid using global data.

Attached is the updated version of the patch (the original description is here: http://archives.postgresql.org/pgsql-hackers/2009-07/msg01332.php) that doesn't use global variables. It also shows the last line of the context in the example above correctly:

psql (8.5devel)
Type "help" for help.

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_log2"
 perl_log2
-----------

(1 row)

Attachment: plperl_error_callback_v2.diff
Description: Binary data



--
Alexey Klyukin       http://www.CommandPrompt.com
The PostgreSQL Company - Command Prompt, Inc.

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to