Re: survey: psql syntax errors abort my transactions - Mailing list pgsql-general

From Adrian Klaver
Subject Re: survey: psql syntax errors abort my transactions
Date
Msg-id 9dca306f-e60c-1bd6-b639-23d9a8f9b4a3@aklaver.com
Whole thread Raw
In response to Re: survey: psql syntax errors abort my transactions  (Jeremy Schneider <schnjere@amazon.com>)
List pgsql-general
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.

But psql can. psql knows what the setting is and act accordingly e.g.:

test(5432)=# \x
Expanded display is on.

My suggestion is that the hint would only be shown in psql. Using  HINT: 
maybe not be the best choice as it shows up in server messages, but 
something along that line.

> 
> 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.
> 
> -Jeremy
> 
> -- 
> Jeremy Schneider
> Database Engineer
> Amazon Web Services
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Jeremy Schneider
Date:
Subject: Re: survey: psql syntax errors abort my transactions
Next
From: Adrian Klaver
Date:
Subject: Re: survey: psql syntax errors abort my transactions