Re: errcontext support in PL/Perl
От | Alexey Klyukin |
---|---|
Тема | Re: errcontext support in PL/Perl |
Дата | |
Msg-id | 36F922D1-FD48-4883-9624-66CC08D03025@commandprompt.com обсуждение исходный текст |
Ответ на | Re: errcontext support in PL/Perl (Alvaro Herrera <alvherre@commandprompt.com>) |
Ответы |
Re: errcontext support in PL/Perl
Re: errcontext support in PL/Perl |
Список | pgsql-hackers |
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$# $$ test-# ; CREATE FUNCTION test=# create function perl_log2() returns void language plperl as $ $ elog (NOTICE, "Test from function two"); my $rv = spi_exec_query('SELECT * FROM perl_log1()'); $$; CREATE FUNCTION 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" perl_log2 ----------- (1 row) -- Alexey Klyukin http://www.CommandPrompt.com The PostgreSQL Company - Command Prompt, Inc.
В списке pgsql-hackers по дате отправления: