Re: Feature discussion: Should syntax errors abort a transaction?

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rafal Pietrak <rafal(at)zorro(dot)isa-geek(dot)com>, Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, "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-20 06:29:37
Message-ID: CA+U5nMLmWoPamqac0eitQo4uN=+y4aR3AEXCTYvnLMWeWUzneA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 19 June 2012 22:07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Rafal Pietrak <rafal(at)zorro(dot)isa-geek(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message aasat 2012-06-20 06:57:54 Re: Is there a way to ask PostgreSQL for the name of the computer it's running on?
Previous Message Craig Ringer 2012-06-20 04:14:46 Re: How to get no. of commits/rollbacks by application on the database?