Re: v8.1: Error severity on libpq PGconn* - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: v8.1: Error severity on libpq PGconn*
Date
Msg-id 8904.1196130273@sss.pgh.pa.us
Whole thread Raw
In response to v8.1: Error severity on libpq PGconn*  (Jeffrey Brendecke <yakhki@yahoo.de>)
Responses Re: v8.1: Error severity on libpq PGconn*  (Bruce Momjian <bruce@momjian.us>)
List pgsql-interfaces
Jeffrey Brendecke <yakhki@yahoo.de> writes:
> Is there a recommended way to get the error severity (ERROR vs. FATAL vs. PANIC, etc.) off a PGconn* as there is for
aPGresult* using PQresultErrorField()?
 
> For example, when I pass in a non-existent database name when creating a connection, I get the following message:

> FATAL:  database "xxxxxx" does not exist

What you're really wishing here is that errors generated within libpq
itself had SQLSTATE and other decoration.  They don't :-(.  Improving
this is on the to-do list, but someone is going to have to sit down and
do several days/weeks of hard and mostly-boring work to make it happen.
Do you want to volunteer?
        regards, tom lane


pgsql-interfaces by date:

Previous
From: Jeffrey Brendecke
Date:
Subject: v8.1: Error severity on libpq PGconn*
Next
From: andrew klassen
Date:
Subject: postmaster process and multithreading