PL/perl elog(ERROR) Does not Abort Transaction

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема PL/perl elog(ERROR) Does not Abort Transaction
Дата
Msg-id B751D88F-23AA-432D-BA80-A13AD9C0ED91@iovation.com
обсуждение исходный текст
Ответы Re: PL/perl elog(ERROR) Does not Abort Transaction
Список pgsql-hackers
Hackers,

Shouldn't a call to elog(NOTICE) invalidate the current tranaction?
   david=# begin;   BEGIN   Time: 0.178 ms   david=# do language plperl $$ elog(ERROR, 'foo')$$;   ERROR:  foo at line
1.  CONTEXT:  PL/Perl anonymous code block   david=# select true;    bool    ------    t   (1 row) 
   Time: 0.203 ms

The docs say:

> ERROR raises an error condition; if this is not trapped by the surrounding Perl code, the error propagates out to the
callingquery, causing the current transaction or subtransaction to be aborted. 

So I'm surprised that the transaction is not aborted. Bug?

David



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Draft release notes complete
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: synchronous_commit and remote_write