pgsql-server/src/backend/tcop postgres.c

From: momjian(at)postgresql(dot)org (Bruce Momjian - CVS)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server/src/backend/tcop postgres.c
Date: 2002-08-06 05:24:05
Message-ID: 20020806052405.38604475943@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

CVSROOT: /cvsroot
Module name: pgsql-server
Changes by: momjian(at)postgresql(dot)org 02/08/06 01:24:05

Modified files:
src/backend/tcop: postgres.c

Log message:
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).

Neil Conway

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2002-08-06 05:30:19 Re: pgsql-server/src backend/access/heap/heapam.c ...
Previous Message Tom Lane 2002-08-06 02:36:35 pgsql-server/src backend/access/heap/heapam.c ...