psql return codes - Mailing list pgsql-hackers

From Simon Riggs
Subject psql return codes
Date
Msg-id 1165320898.3839.152.camel@silverbirch.site
Whole thread Raw
Responses Re: psql return codes
List pgsql-hackers
Currently, if we issue this command
psql --set ON_ERROR_STOP= -f f.sql

where f.sql has "select * from foo;"
then psql will return 
0    if foo exists
3    if foo does not exist (or other SQL error)

Whereaspsql --set ON_ERROR_STOP= -c "select * from foo;"
returns
0    if foo exists
1    if foo does not exist (or other SQL error)

Is this a minor oversight, or some aspect of design?

--  Simon Riggs              EnterpriseDB   http://www.enterprisedb.com




pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: [PATCHES] Bundle of patches
Next
From: Zdenek Kotala
Date:
Subject: Re: Order of checking for readline support libraries