Skip site navigation (1) Skip section navigation (2)

Re: v8.1: Error severity on libpq PGconn*

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeffrey Brendecke <yakhki(at)yahoo(dot)de>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: v8.1: Error severity on libpq PGconn*
Date: 2007-11-27 02:24:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Jeffrey Brendecke <yakhki(at)yahoo(dot)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 a PGresult* 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

In response to


pgsql-interfaces by date

Next:From: Abraham, DannyDate: 2007-11-28 14:43:00
Subject: Sliding windows on LIBPQ
Previous:From: Jeffrey BrendeckeDate: 2007-11-26 23:52:50
Subject: v8.1: Error severity on libpq PGconn*

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group