On 10/18/2013 02:19 AM, Fabien COELHO wrote:
IMHO the current behavior is broken:
decibel@decina:[17:46]~/pgsql/HEAD/i$bin/psql -c 'select 1' -c
Another try with one -c but with similar results:
sh> psql -c "SELECT 1; SELECT 'hello';"
sh> psql -V
psql (PostgreSQL) 9.3.1
It's not broken. All this behaviour is documented fairly explicitly. See
example, regarding Fabio's example, which is actually very different
from Jim's, the docs say: "only the result of the last SQL command is
If you want to argue that it should be enhanced, then do. But it's
acting as designed and as documented.
I suspect changing this might actually have more wrinkles that you
imagine, but I could be wrong.
Incidentally, both of you could probably achieve what you apparently
echo 'some sql here' | psql
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: