Re: Test database for new installs? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Test database for new installs?
Date
Msg-id 28519.1100879842@sss.pgh.pa.us
Whole thread Raw
In response to Re: Test database for new installs?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> 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.

Oh, right.  Yes, we should do something about that.  I think we could
invent PQerrorField which is to PQerrorMessage as PQresultErrorField
is to PQresultErrorMessage.  The reason I didn't do so during the 7.4
cycle is that errors generated internally within libpq wouldn't have any
field information, at least not without significant hacking on the libpq
sources.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Adding a suffix array index
Next
From: Andreas Pflug
Date:
Subject: Re: Test database for new installs?