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)
Whereas
psql --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