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

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Edson Richter <edsonrichter(at)hotmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Rafal Pietrak <rafal(at)zorro(dot)isa-geek(dot)com>, "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 17:25:24
Message-ID: CAOR=d=11anPSC8CYN5m8Qr=LJaAmFfMsrGadY7f-HWniYnk9EA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 19, 2012 at 8:50 AM, Edson Richter <edsonrichter(at)hotmail(dot)com> wrote:
> There is also the case of dynamically generated sql statements based on user selection... being syntax or not, I would never want half job done. Thia is the purpose of transactions: or all or nothing...

This this this, and again, this. Imagine:

begin;
insert into tableb selcet * from tableb;
truncate tableb;
commit;

What should happen when we get to the error on the second line? Keep
going? Boom, data gone because of a syntax error.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2012-06-19 17:28:39 Re: db server processes hanging around
Previous Message Paul Jones 2012-06-19 17:10:27 Re: Fine-grained replication?