Re: Parser abort ignoring following commands - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Parser abort ignoring following commands
Date
Msg-id Pine.LNX.4.30.0105261721400.757-100000@peter.localdomain
Whole thread Raw
In response to Re: Parser abort ignoring following commands  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Parser abort ignoring following commands
List pgsql-hackers
Tom Lane writes:

> Peter Eisentraut <peter_e@gmx.net> writes:
> > psql -c 'select * from pg_class; select * from no_such_table;'
> > Shouldn't this at least give me the result of the first select before
> > aborting the second?
>
> The behavior you are complaining of is not the backend's fault.
> The reason it acts that way is that psql is feeding the entire -c
> string to the backend as one query, and not paying any attention
> to the possibility that multiple query results might be available
> from the string.

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.

$ psql -c 'drop user joe; drop user foo;'
ERROR:  DROP USER: user "foo" does not exist

User "joe" exists, but it is not dropped.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Parser abort ignoring following commands
Next
From: Tom Lane
Date:
Subject: Re: Parser abort ignoring following commands