[HACKERS] libpq: How to get the error code after a failed PGconn connection

2014-04-29 Thread Hello World
Given the following code. PGconn* const conn=PQconnectdbParams(keywords, values, false); if(! conn || PQstatus(conn)!=CONNECTION_OK){ /* error code? */ } - In case of a failed connection is there a way to get the error code to be able to distinguish between a (e.g.) bad password and the server

Re: [HACKERS] libpq: How to get the error code after a failed PGconn connection

2014-04-29 Thread Tom Lane
Hello World worldani...@gmail.com writes: Given the following code. PGconn* const conn=PQconnectdbParams(keywords, values, false); if(! conn || PQstatus(conn)!=CONNECTION_OK){ /* error code? */ } - In case of a failed connection is there a way to get the error code to be able to distinguish