Re: BUG #17504: psql --single-transaction -vON_ERROR_STOP=1 still commits after client-side error

Christoph Berg <christoph.berg@credativ.de>

From: Christoph Berg <christoph.berg@credativ.de>
To: pgsql-bugs@lists.postgresql.org
Date: 2022-05-30T15:18:28Z
Lists: pgsql-bugs
Re: PG Bug reporting form
> The problem is not limited to \copy; \i has the same problem.
> A workaround is to drop -1, and use an explicit transaction in the script.

\connect correctly aborts the whole operation.

I would suggest that all client-side errors should be handled as fatal
when both --single-transaction and -vON_ERROR_STOP=1 are in effect.

Christoph



Commits

  1. Tweak behavior of psql --single-transaction depending on ON_ERROR_STOP

  2. Doc: remove a04ccf6df from release notes, now that it's reverted.

  3. Revert "Fix psql's single transaction mode on client-side errors with -c/-f switches".

  4. Fix psql's single transaction mode on client-side errors with -c/-f switches