From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | "Jim C(dot) Nasby" <jim(at)nasby(dot)net> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: psql return codes |
Date: | 2006-12-06 19:15:32 |
Message-ID: | 200612061915.kB6JFWI29096@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jim C. Nasby wrote:
> > Well, our psql manual page has:
> >
> > EXIT STATUS
> > psql returns 0 to the shell if it finished normally, 1 if
> > a fatal error of its own (out of memory, file not found)
> > occurs, 2 if the connection to the server went bad and the
> > session was not interactive, and 3 if an error occurred in
> > a script and the variable ON_ERROR_STOP was set.
> >
> > Were you asking if this behavior is documented, or if it is desirable?
>
> Maybe I'm just dense this AM, but I'm not seeing how that explains what
> Simon is seeing? Why should it matter if the "SELECT * FROM foo" came to
> psql via -f or -c?
Well, it explains exactly what Simon was seeing. I agree it is strange,
but I was asking if Simon knew it was documented. I assume the "3" is
used to report a different error from 'file not found' or something.
--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-12-06 19:25:46 | Re: psql return codes |
Previous Message | Simon Riggs | 2006-12-06 19:04:32 | Re: old synchronized scan patch |