On Wed, Nov 11, 2009 at 3:33 PM, Eugene Lisitsky <[email protected]> wrote:
> Is it possible to check error and fail reason: network, connection refused,
> password incorrect, no access to such DB?
Not reliably, because we only get CONNECTION_GOOD, CONNECTION_BAD as
connection status flags from libpq, and in the event of a connection
error, get a possibly-localised error message. There are no
standardised codes for connection errors (unlike query results, for
which you can get SQL status codes etc).
> Or at least as a workaround fill the form with old password?
We don't know it, unless you just typed it in. Libpq reads it from
.pgpass and pgAdmin never touches it.
>> There's definitely room for improvement here though - es are
>> welcome if anyone wants to spend some time on it.
>
> Unfortunately I'm not a C developer. But I can try :)
:-)
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com