Re: PL/perl elog(ERROR) Does not Abort Transaction

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: PL/perl elog(ERROR) Does not Abort Transaction
Дата
Msg-id 20120511004147.GH16881@momjian.us
обсуждение исходный текст
Ответ на Re: PL/perl elog(ERROR) Does not Abort Transaction  ("David E. Wheeler" <david.wheeler@iovation.com>)
Ответы Re: PL/perl elog(ERROR) Does not Abort Transaction  ("David E. Wheeler" <david.wheeler@iovation.com>)
Re: PL/perl elog(ERROR) Does not Abort Transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, May 10, 2012 at 05:27:26PM -0700, David E. Wheeler wrote:
> On May 10, 2012, at 5:20 PM, Bruce Momjian wrote:
> 
> >> 
> >> Shouldn't a call to elog(NOTICE) invalidate the current tranaction?
> > 
> > I assume you mean elog(ERROR)?
> 
> Yes, sorry.
> 
> > Well, git head show an error:
> > 
> >     test=> begin;
> >     BEGIN
> >     test=> do language plperl $$ elog(ERROR, 'foo')$$;
> >     ERROR:  foo at line 1.
> >     CONTEXT:  PL/Perl anonymous code block
> >     test=> select true;
> >     ERROR:  current transaction is aborted, commands ignored until end of
> >     transaction block
> 
> Interesting. My build (from source):
> 
>  PostgreSQL 9.1.3 on x86_64-apple-darwin11.3.0, compiled by i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on
AppleInc. build 5658) (LLVM build 2336.1.00), 64-bit
 
> (1 row)

OK, still an abort on 9.1.X head:
$ psql testpsql (9.1.3)Type "help" for help.test=> begin;BEGINtest=> do language plperl $$ elog(ERROR, 'foo')$$;ERROR:
fooat line 1.CONTEXT:  PL/Perl anonymous code blocktest=> select true;ERROR:  current transaction is aborted, commands
ignoreduntil end oftransaction block
 

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Florian Pflug
Дата:
Сообщение: Re: Gsoc2012 idea, tablesample
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: PL/perl elog(ERROR) Does not Abort Transaction