aborted transaction -> error

Поиск
Список
Период
Сортировка
Искать
От
nconway@klamath.dyndns.org (Neil Conway)
Тема
aborted transaction -> error
Дата
Msg-id
20020729153310.GB7080@klamath.dyndns.org
Список
Дерево обсуждения
aborted transaction -> error nconway@klamath.dyndns.org (Neil Conway)
Re: aborted transaction -> error Neil Conway <nconway@klamath.dyndns.org>
Re: aborted transaction -> error "Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
Re: aborted transaction -> error Bruce Momjian <pgman@candle.pha.pa.us>
This patch changes the behavior of PostgreSQL so that if any queries are
executed in an implicitely aborted transaction (e.g. after an occur
occurs), we return an error (and not just a warning). For example:

nconway=# begin;
BEGIN
nconway=# insert; -- syntax error
ERROR:  parser: parse error at or near ";"
nconway=# select * from a;
ERROR:  current transaction is aborted, queries ignored until end of
transaction block

The old behavior was:

nconway=# begin;
BEGIN
nconway=# insert;  
ERROR:  parser: parse error at or near ";"
nconway=# select * from a;
WARNING:  current transaction is aborted, queries ignored until end
of transaction block
*ABORT STATE*

Which can be confusing: if the client isn't paying careful attention,
they will conclude that the query has executed (because no error is
returned).

Tom remarked that our old behavior was problematic:

    http://archives.postgresql.org/pgsql-hackers/2002-06/msg00325.php

Cheers,

Neil

-- 
Neil Conway 
PGP Key ID: DB3C29FC
В списке pgsql-patches по дате отправления
От: Joe Conway
Дата:
От: nconway@klamath.dyndns.org (Neil Conway)
Дата:
Сообщение: clean up assertion code
FAQ