A bad behavior under autocommit off mode

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: A bad behavior under autocommit off mode
Date: 2003-02-20 03:58:34
Message-ID: 3E54526A.121EBEE5@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

There seems a bad behavior under autocommit off mode.

1) psql -c 'set autocommit to off;select 1;commit'
causes a WARNING: COMMIT: no transaction in progress
whereas
2) psql -c 'begin;select 1;commit'
causes no error/warning.

Note that the result is the same even when you issue
the first set/begin command separately using the client
softwares other than psql.

The problem here is that the transaction is cancelled
in case of 1) though no error is reported.
Shouldn't we avoid the warning and the cancellation ?
Or should an error be reported instead of the warning ?

regards,
Hiroshi Inoue
http://www.geocities.jp/inocchichichi/psqlodbc/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-02-20 04:16:17 Re: request for sql3 compliance for the update command
Previous Message Tom Lane 2003-02-20 03:47:22 Re: request for sql3 compliance for the update command