Hello David,

At least we aggree that having a documentation would be an improvement:-)

On the second point:

 - all results should be shown, not just the last one

disagree

# select 1 ; select 2 ;

vs

# select 1 \; select 2 ;

Result in identical behavior seems undesirable.

In both cases there is the two same queries, so having the same results does not strike me as "undesirable", on the contrary.

At least now if you want to discard all intermediate work and just show the last statement you can do so without going to any great lengths. If you really want both results don't use "\;". This makes even more sense when the earlier statements are DML instead of SELECT.

Hmmm. I do not buy this "\; executes a statement but does not show the results" as a sane and expected behavior.

I think that the underlying and only reason it behaves like this is that at the protocol level one can send a batch of queries in one go, but for the simple "PQexec" function just one result is returned, the last one was chosen probably as a marker that they were all executed, and that is all.

So I see this as a low-level simplified API detail which has an unforeseen user impact.

--
Fabien.


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to