Fabien COELHO <coelho@cri.ensmp.fr> writes:
> Hello devs,
> Although this is probably a "feature", it is a weird one:
> $ psql
> psql (9.6beta2)
> fabien=# SELECT 1 AS one \;
> fabien-# SELECT 2 AS two ;
> two
> -----
> 2
> (1 row)
> Where is my "1"?
> Although "\;" behavior is not documented, I would have expected both
> results to be shown one after the other, or having a an error, but not a
> quiet discard.
See the documentation for PQexec(): all but the last query result is
discarded.
> I would suggest that:
> - the \; psql feature should be documented somewhere
> - all results should be shown, not just the last one
> Any opinion?
I do not think changing this is appropriate. All you are likely to
accomplish is breaking code that does what its author wanted.
regards, tom lane