Skip site navigation (1) Skip section navigation (2)

Re: Parser abort ignoring following commands

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parser abort ignoring following commands
Date: 2001-05-26 18:50:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
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().

I guess that this is a multi-command statement ?

It has always been so, except that psql seems to do some parsing and
each command to backend separately.


In response to

pgsql-hackers by date

Next:From: Adam HaberlachDate: 2001-05-27 02:00:44
Subject: Re: Parser abort ignoring following commands
Previous:From: Oleg BartunovDate: 2001-05-26 17:53:39
Subject: Re: First version of multi-key index support for GiST

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group