[GENERAL] unexplainable psql exit status 1

2013-12-04 Thread Tim Kane
HI all, Is anyone aware of cases where psql will occasionally return an exit status of 1, despite there being no obvious error condition? I have a regular (daily) cron that executes a fairly simple script of the form: psql --set ON_ERROR_STOP=1 -h $DB_HOST -U $DB_USER -a -v DATE='${DATE}' -v

Re: [GENERAL] unexplainable psql exit status 1

2013-12-04 Thread Tim Kane
I should have mentioned, psql client and server version 9.2.4 From: Tim Kane tim.k...@gmail.com Date: Wednesday, 4 December 2013 10:59 To: pgsql-general General pgsql-general@postgresql.org Subject: unexplainable psql exit status 1 HI all, Is anyone aware of cases where psql will

Re: [GENERAL] unexplainable psql exit status 1

2013-12-04 Thread Albe Laurenz
Tim Kane wrote: Is anyone aware of cases where psql will occasionally return an exit status of 1, despite there being no obvious error condition? I have a regular (daily) cron that executes a fairly simple script of the form: psql --set ON_ERROR_STOP=1 -h $DB_HOST -U $DB_USER -a

Re: [GENERAL] unexplainable psql exit status 1

2013-12-04 Thread Tim Kane
According to the documentation you quoted, it would be useless to set log_statement=all, because the problem is on the client end. Shell debugging sounds slightly more promising, but it will probably not tell you much more than that psql returned with exit code 1. A quick look at the

Re: [GENERAL] unexplainable psql exit status 1

2013-12-04 Thread Albe Laurenz
Tim Kane wrote: I’ve enabled shell debugging to be 100% sure that I’m not munging the return code anywhere. It’s entirely possible there is something going on at the shell side of things, though I fail to see how just at the minute :) The output of the script is as follows, bearing in mind