Re: survey: psql syntax errors abort my transactions

2020-07-06 Thread Laurenz Albe
On Fri, 2020-07-03 at 12:46 -0500, Ron wrote: > > This is my favorite example why I like the way PostgreSQL does things: > > > > /* poor man's VACUUM (FULL) */ > > BEGIN; > > CREATTE TABLE t2 AS SELECT * FROM t1; > > DROP TABLE t1; > > ALTER TABLE t2 RENAME TO t1; > > COMMIT; > > How so, since it

Re: survey: psql syntax errors abort my transactions

2020-07-05 Thread raf
Jeremy Schneider wrote: > Survey for the user community here on the pgsql-general list: it would > be great if lots of people could chime in by answering two questions > about your very own production environment: > > question 1) are you worried about scripts in your production environment > wher

Re: survey: psql syntax errors abort my transactions

2020-07-03 Thread Julien Rouhaud
On Fri, Jul 3, 2020 at 7:46 PM Ron wrote: > > On 7/3/20 1:54 AM, Laurenz Albe wrote: > > This is my favorite example why I like the way PostgreSQL does things: > > > > /* poor man's VACUUM (FULL) */ > > BEGIN; > > CREATTE TABLE t2 AS SELECT * FROM t1; > > DROP TABLE t1; > > ALTER TABLE t2 RENAME T

Re: survey: psql syntax errors abort my transactions

2020-07-03 Thread Ron
On 7/3/20 1:54 AM, Laurenz Albe wrote: On Thu, 2020-07-02 at 08:54 -0700, Jeremy Schneider wrote: Maybe it's just me, but I'm wondering if it's worth changing the default behavior of psql so it doesn't abort transactions in interactive mode when I mistakenly mis-spell "select" or something sill

Re: survey: psql syntax errors abort my transactions

2020-07-02 Thread Laurenz Albe
On Thu, 2020-07-02 at 08:54 -0700, Jeremy Schneider wrote: > Maybe it's just me, but I'm wondering if it's worth changing the default > behavior > of psql so it doesn't abort transactions in interactive mode when I mistakenly > mis-spell "select" or something silly like that. > This is of course e

Re: survey: psql syntax errors abort my transactions

2020-07-02 Thread Laurenz Albe
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: cu

Re: survey: psql syntax errors abort my transactions

2020-07-02 Thread Adrian Klaver
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 ex

Re: survey: psql syntax errors abort my transactions

2020-07-02 Thread Adrian Klaver
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 ex

Re: survey: psql syntax errors abort my transactions

2020-07-02 Thread Adrian Klaver
On 7/2/20 8:54 AM, Jeremy Schneider wrote: Maybe it's just me, but I'm wondering if it's worth changing the default behavior of psql so it doesn't abort transactions in interactive mode when I mistakenly mis-spell "select" or something silly like that.  This is of course easily remedied in my p

Re: survey: psql syntax errors abort my transactions

2020-07-02 Thread David G. Johnston
On Thu, Jul 2, 2020 at 8:54 AM Jeremy Schneider wrote: > > https://www.postgresql.org/message-id/flat/CABTbUpiAOKZ405uArt8cJFtC72RhzthmvWETQK_6Qw0Ad-HquQ%40mail.gmail.com > > This thread on hackers actually seemed kindof short to me. Not nearly > enough bike-shedding to call it a closed case. >