From: | Peter Bex <Peter(dot)Bex(at)xs4all(dot)nl> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Feature discussion: Should syntax errors abort a transaction? |
Date: | 2012-06-19 07:24:28 |
Message-ID: | 20120619072428.GA12275@frohike.homeunix.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jun 19, 2012 at 02:20:57AM -0400, Tom Lane wrote:
> Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> writes:
> > I've been working in psql a lot recently, and have started to wonder why
> > statements with syntax errors or other problems that render them
> > unexecutable terminate the transaction.
>
> Well, the obvious reason is that it's hard to tell what the user meant,
> so bailing is the safest response.
>
> > I understand why statements that raise errors during their execution
> > terminate a transaction,
>
> So you're suggesting that "SELECT 1/0;" should terminate a transaction,
> but "SELECT 1//0;" should not? How about "ROLBACK;"? It gets pretty
> squishy pretty fast when you try to decide which sorts of errors are
> more important than others.
+1. I hate tools that try to read your mind. They invariably fail
at that. The current behaviour is 100% correct and unambiguous.
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
From | Date | Subject | |
---|---|---|---|
Next Message | Hitoshi Harada | 2012-06-19 07:32:59 | Re: How to include Tablefunc as an extension |
Previous Message | Stefan Schwarzer | 2012-06-19 06:34:52 | Re: How to include Tablefunc as an extension |