psql dones't reflect exit status if input command via stdin - Mailing list pgsql-general

From magodo
Subject psql dones't reflect exit status if input command via stdin
Date
Msg-id ee57f43d501e57e7dfa70be17b6345ae2e9ffdcb.camel@sina.com
Whole thread Raw
Responses Re: psql dones't reflect exit status if input command via stdin
List pgsql-general
Hello,

I found when running command like `# echo "xxx" | psql postgres
postgres`, the return code is always 0 even though the command ("xxx")
here is of invalid syntax. While the `psql -c` way handled exit code
correctly.

In the meanwhile, mysql client handled both cases correctly.

---
Zhaoting.Weng





pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: does postgresql backup require additional space on disk
Next
From: "David G. Johnston"
Date:
Subject: Re: psql dones't reflect exit status if input command via stdin