Am Freitag, 19. November 2004 15:59 schrieb Tom Lane:
> > is to make psql recognize the error (the error code regime in libpq would
> > have to be extended for that),
>
> Extended how? The error you're interested in will come back as
> ERRCODE_UNDEFINED_DATABASE.
AFAICT, error codes are only accessible through PGresult. But if the
connection attempt fails, you have at best a PGconn. This is the same kind
of issue we have with frontends parsing the "no password supplied" message,
because PQconnect cannot supply an error code in this case.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/