From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Adrian Klaver <adrian.klaver@aklaver.com>
To: Jeremy Schneider <schnjere@amazon.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: survey: psql syntax errors abort my transactions
Date: Fri, 03 Jul 2020 08:46:34 +0200
Message-ID: <0f707f39184a972e8404061fac6bbce1635e7f93.camel@cybertec.at> (raw)
In-Reply-To: <dbda16c8-f551-649d-2822-eb76c2fcf1da@aklaver.com>
References: <d3914fb6-6777-e532-fa4a-024672914cbc@amazon.com>
<dbda16c8-f551-649d-2822-eb76c2fcf1da@aklaver.com>
On Thu, 2020-07-02 at 09:31 -0700, Adrian Klaver wrote:
> I would say just add a message to the ERROR that points out
> ON_ERROR_ROLLBACK = 'on' is available. For instance:
>
> test(5432)=# begin ;
> BEGIN
> test(5432)=# select 1/0;
> ERROR: division by zero
> test(5432)=# select 1;
> ERROR: current transaction is aborted, commands ignored until end of
> transaction block
>
> New part of message
> HINT: \set ON_ERROR_ROLLBACK on to rollback on error.
-1
That would increase the already annoying spam of "current transaction is aborted"
messages when your transaction fails.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, adrian.klaver@aklaver.com, schnjere@amazon.com
Subject: Re: survey: psql syntax errors abort my transactions
In-Reply-To: <0f707f39184a972e8404061fac6bbce1635e7f93.camel@cybertec.at>
References: <d3914fb6-6777-e532-fa4a-024672914cbc@amazon.com> <dbda16c8-f551-649d-2822-eb76c2fcf1da@aklaver.com> <0f707f39184a972e8404061fac6bbce1635e7f93.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox