From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Jeremy Schneider <schnjere@amazon.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: survey: psql syntax errors abort my transactions
Date: Thu, 2 Jul 2020 09:56:33 -0700
Message-ID: <a1e157fb-47cc-8805-b650-3dd053c28e73@aklaver.com> (raw)
In-Reply-To: <58f63b75-f11e-ce5b-3ec5-7d4acfbb87d6@amazon.com>
References: <d3914fb6-6777-e532-fa4a-024672914cbc@amazon.com>
<CAKFQuwZHY9Bp52pb+5q3tHQf6Bpj5rOO-VcYogVscyOLPAUhsA@mail.gmail.com>
<58f63b75-f11e-ce5b-3ec5-7d4acfbb87d6@amazon.com>
On 7/2/20 9:44 AM, Jeremy Schneider wrote:
> On 7/2/20 09:28, David G. Johnston wrote:
>> The status quo prevailed since no-one chose to contribute further
>> arguments for change and the original patch was retracted. What kind
>> of "bike-shedding" (which seems to be used incorrectly here) would you
>> expect?
>
> The bike-shedding comment reflects my sense of humor, which is evidently
> so dry that it can be entirely un-detectable. :) But overall I do
> think there's room for input from more people. Might not change the
> outcome, I'm just curious if there are more people who'd have thoughts
> to offer.
>
> I'm not sure hint text would be the right course, as the hint wouldn't
> make sense in the context of other clients and I don't know if we have a
> mechanism now for the server to change it's error response based on
> which client is being used.
>
> One other thought occurred to me after sending this email - does
> ON_ERROR_ROLLBACK=interactive differentiate between syntax errors and
> other errors? Thinking about how users approach SQL, this feels
> significant. I'd happily want to let users at my company retry after
> syntax errors, but I'd want them to inspect any other error more closely.
An error is an error:
\set ON_ERROR_ROLLBACK interactive
test(5432)=# begin ;
BEGIN
test(5432)=# slect 1;
ERROR: syntax error at or near "slect"
LINE 1: slect 1;
^
test(5432)=# select 1;
?column?
----------
1
(1 row)
test(5432)=# select 1/0;
ERROR: division by zero
test(5432)=# select 1;
?column?
----------
1
(1 row)
>
> -Jeremy
>
> --
> Jeremy Schneider
> Database Engineer
> Amazon Web Services
>
--
Adrian Klaver
adrian.klaver@aklaver.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: adrian.klaver@aklaver.com, schnjere@amazon.com, david.g.johnston@gmail.com
Subject: Re: survey: psql syntax errors abort my transactions
In-Reply-To: <a1e157fb-47cc-8805-b650-3dd053c28e73@aklaver.com>
References: <d3914fb6-6777-e532-fa4a-024672914cbc@amazon.com> <CAKFQuwZHY9Bp52pb+5q3tHQf6Bpj5rOO-VcYogVscyOLPAUhsA@mail.gmail.com> <58f63b75-f11e-ce5b-3ec5-7d4acfbb87d6@amazon.com> <a1e157fb-47cc-8805-b650-3dd053c28e73@aklaver.com>
* 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