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

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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeffrey Brendecke <yakhki(at)yahoo(dot)de>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: v8.1: Error severity on libpq PGconn*
Date: 2008-03-07 17:54:05
Message-ID: 200803071754.m27Hs5k21135@momjian.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
Added to TODO:

        o Add SQLSTATE severity to PGconn return status

          http://archives.postgresql.org/pgsql-interfaces/2007-11/msg00015.php

---------------------------------------------------------------------------

Tom Lane wrote:
> 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
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>        message can get through to the mailing list cleanly

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

In response to

pgsql-interfaces by date

Next:From: Edmund BaconDate: 2008-03-18 22:47:51
Subject: ECPG connection timeouts
Previous:From: jing hanDate: 2008-02-29 14:16:11
Subject: jing h sent you a special gift

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