Re: problem with new autocommit config parameter and jdbc - Mailing list pgsql-hackers

From Tom Lane
Subject Re: problem with new autocommit config parameter and jdbc
Date
Msg-id 15685.1031624823@sss.pgh.pa.us
Whole thread Raw
In response to Re: problem with new autocommit config parameter and jdbc  (snpe <snpe@snpe.co.yu>)
Responses Re: problem with new autocommit config parameter and jdbc  (Curt Sampson <cjs@cynic.net>)
List pgsql-hackers
snpe <snpe@snpe.co.yu> writes:
> I'm use 'autocommit=false' and have problem with psql
> When any commnad is lost, then next commnad get error for transactions
> (simple select command).BTW

> snpe> select * from org_ba;
> ERROR: relation org_ba does not exists
> snpe> select * from org_ban;
> ERROR: current transactions is aborted, queries ignored until end of
> transaction block

Um, what's wrong with that?

It seems to me that an application that is using autocommit=off will
expect the first SELECT to start a transaction block.  If the first
SELECT fails, then subsequent commands *should* fail until you commit
or rollback.  Certainly if you did an explicit BEGIN before the first
SELECT, the above is what you'd get --- why should implicit BEGIN
work differently?

            regards, tom lane

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Proposal: Solving the "Return proper effected tuple
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Proposal: Solving the "Return proper affected tuple