Re: Feature discussion: Should syntax errors abort a transaction? - Mailing list pgsql-general

From Chris Travers
Subject Re: Feature discussion: Should syntax errors abort a transaction?
Date
Msg-id CAKt_ZfvboTwwcVufmJuNGE0OuZ8P-17sbuEbShxdG6YSOFqJAA@mail.gmail.com
Whole thread Raw
In response to Re: Feature discussion: Should syntax errors abort a transaction?  (Rafal Pietrak <rafal@zorro.isa-geek.com>)
List pgsql-general


On Sun, Jun 24, 2012 at 1:37 PM, Rafal Pietrak <rafal@zorro.isa-geek.com> wrote:
On Sat, 2012-06-23 at 12:18 +0000, Jasen Betts wrote:
> On 2012-06-19, Rafal Pietrak <rafal@zorro.isa-geek.com> wrote:
>
> > And we are talking about interractive psql breaking transaction because
> > of syntax error - almost always this is a one time typo. I'd prefere it
> > to be a bit more "sloopy", then deployed SQL application (e.g.
> > non-interactive session).
>
> possibly you could program keyboard macros to handle savepoints to
> have an easy way to recover from these errors, but if you're working on a

Yes, but again. In my own psql usage, it goes like this: "this is a
simple and easy SQL, most of it was cut/paste anyway .... what could
possibly go wrong .... ups". But it goes wrong in less then every 20th
or 100th time, less then once in a few months. So i don't realy feel
like pushing somebody into a development effort, that woud just slightly
enhance psql comfort of usage. I most certainly want even be cooking any
macros, as .... I would forget to use it when it could be of some help. 

My comment on this thread was mearly to object, that a request to allow
maintaining transaction state despite syntax error is "obviusly wrong".

> busy database keeping a transaction open whislt you think about syntax
> is going to cost perfromance for the other users.

And this is a really good point - although I do know my schemas and I
can choose appropriate moment for long hand-opened transation, mistakes
happen (well, this whole thread is about mistakes :)

Additionally, I would point out that the times I have gotten into trouble with long-running transactions delaying other users it has been functioning queries which updated lots of rows unexpectedly slowly, not syntax errors ;-) 

Best Wishes,
Chris Travers

pgsql-general by date:

Previous
From: Edson Richter
Date:
Subject: ODBC FDW - could a gently soul help on geting binaries?
Next
From: Excite Holidays
Date:
Subject: Question about EXISTS