Re: psql dones't reflect exit status if input command via stdin

2019-05-14 Thread magodo
On Mon, 2019-05-13 at 23:39 -0700, David G. Johnston wrote: > On Mon, May 13, 2019 at 11:24 PM magodo wrote: > > 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. W

Re: psql dones't reflect exit status if input command via stdin

2019-05-13 Thread David G. Johnston
On Mon, May 13, 2019 at 11:24 PM magodo wrote: > 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. > Its only required to han