Re: Parser abort ignoring following commands

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parser abort ignoring following commands
Date: 2001-05-26 15:57:16
Message-ID: Pine.LNX.4.30.0105261755260.757-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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().

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-05-26 16:14:52 Re: Parser abort ignoring following commands
Previous Message Tom Lane 2001-05-26 15:36:54 Re: Parser abort ignoring following commands