psql: exit status - Mailing list pgsql-general

From Moritz Sinn
Subject psql: exit status
Date
Msg-id m3it2o9moo.fsf@moritz.sinnhq.de
Whole thread Raw
List pgsql-general
hi,

when i submit a single SQL command to psql (by -c), and this command
fails, the exit status of psql is 1 ($?).
but if i use the -f option to get the SQL commands from a file, and
these commands fail, the exit status is 0.
i think here the exit status should be >0.
i wanted to use psql in a script, that's why i came to this problem.

regards,
 moritz

--
Charles Briscoe-Smith <cpbs@debian.org>:
  After all, the gzip package is called `gzip', not `libz-bin'...

James Troup <troup@debian.org>:
  Uh, probably because the gzip binary doesn't come from the
  non-existent libz package or the existent zlib package.
    -- debian-bugs-dist

pgsql-general by date:

Previous
From: "Ben-Nes Michael"
Date:
Subject: Return num of deleted rows from function
Next
From: Tom Lane
Date:
Subject: Re: Return num of deleted rows from function