I need to check, from a bash script, if certain database exists in a
postgres cluster. When I issue:
psql -U someuser somedatabase
psql returns error code 2 regardless of 'no user' or 'no database'
condition. How could I distinguish from the two?
Mario