Re: Parser abort ignoring following commands

From: Adam Haberlach <adam(at)newsnipple(dot)com>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parser abort ignoring following commands
Date: 2001-05-27 02:00:44
Message-ID: 20010526190044.A15669@newsnipple.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, May 26, 2001 at 05:57:16PM +0200, Peter Eisentraut wrote:
> Tom Lane writes:
>
> > Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > > No, I think there is another problem. How about something without
> > > selects:
> >
> > > $ psql -c 'delete from pk; delete from xx;'
> > > ERROR: Relation 'xx' does not exist
> >
> > > "pk" exists, but nothing is deleted.
> >
> > Sure, because the transaction is rolled back. The whole string
> > is executed in one transaction. You will definitely break existing
> > applications if you change that.
>
> Applications that rely on this behaviour are broken. It was always said
> that statements are in their own transaction block unless in an explicit
> BEGIN/COMMIT block. A statement is defined to end at the semicolon, not
> at the end of the string you submit to PQexec().

You put semicolons at the end of your strings to PQexec()?

--
Adam Haberlach | At either end of the social spectrum there lies
adam(at)newsnipple(dot)com | a leisure class. -- Eric Beck 1965
http://www.newsnipple.com |
'88 EX500 '00 >^< | http://youlook.org

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-05-27 03:46:41 Re: First version of multi-key index support for GiST
Previous Message Hannu Krosing 2001-05-26 18:50:58 Re: Parser abort ignoring following commands