Hello Tom,

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.

Sure. That is developer-level answer to "why", although it does not really say why the developer chose PQexex over PQsendQuery. At the user-level the behavior is still pretty surprising.

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.

Hmmm... My 0.02€: Currently this feature is NOT documented, so somehow it is not supported, and relying on it seems risky, as it is really a side effect of the current implementation. If it becomes documented, it could be made to behave sanely at the same time...

--
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