Hi Tom and everyone else; After significant additional research this is what I have turned up:
1) The problem was a problem in DBD::Pg which didn't quite succeed in setting the connection state to 08006. I have submitted a patch for that to the DBD::Pg project. 2) As of 8.1, tshark shows that the server does send the SQLSTATE to the client regarding why the login fails (for example 3D000 in the case of bad db name). Libpq as far as I can tell (from reading the code) doesn't do anything with this code. Certainly there seems to be no exposure of the SQLSTATE to anything as it relates to a failed connection attempt. I could be missing something because I am not extremely familiar with the libpq codebase, but it seems that the value is just discarded. Are there any plans to expose the SQLSTATE from a failed connection attempt upwards through the library? (I would be happy to try to write a patch but you probably don't want my C code in your library.) Best Wishes, Chris Travers -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs