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

From Simon Riggs
Subject Re: Feature discussion: Should syntax errors abort a transaction?
Date
Msg-id CA+U5nMLmWoPamqac0eitQo4uN=+y4aR3AEXCTYvnLMWeWUzneA@mail.gmail.com
Whole thread Raw
In response to Re: Feature discussion: Should syntax errors abort a transaction?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Feature discussion: Should syntax errors abort a transaction?  (Chris Travers <chris.travers@gmail.com>)
List pgsql-general
On 19 June 2012 22:07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Rafal Pietrak <rafal@zorro.isa-geek.com> writes:
>> The point is, that SQL syntax errors are so obviusly different from
>> execution errors, that noting this distinction should not raise any
>> ambiguity.
>
> I beg to disagree.  Typos can manifest themselves as execution errors
> just as well as syntax errors.

The arguments for the current behaviour are clear and rational. I see
no challenge possible on that basis.

However, PostgreSQL is one of the only databases to behave in this
way. This causes some database applications to have subtle problems
when we migrate/port them to work with us. Some, though few, programs
actually rely on run-time errors in order to execute correctly. I
don't condone or encourage that but I do recognise that there is
substantial legacy code out there, and much of that needs to run on
multiple DBMS.

So it would be useful to have a non-default option of statement-level
abort for those cases, as an ease of use feature.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: How to get no. of commits/rollbacks by application on the database?
Next
From: aasat
Date:
Subject: Re: Is there a way to ask PostgreSQL for the name of the computer it's running on?