Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id DE2F12E00C0 for ; Mon, 26 Nov 2007 19:52:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 32545-03 for ; Mon, 26 Nov 2007 19:52:48 -0400 (AST) Received: from web26909.mail.ukl.yahoo.com (web26909.mail.ukl.yahoo.com [217.146.176.98]) by postgresql.org (Postfix) with SMTP id D569D2E007F for ; Mon, 26 Nov 2007 19:52:51 -0400 (AST) Received: (qmail 85394 invoked by uid 60001); 26 Nov 2007 23:52:50 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.de; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=2etr55DoicDzq3jEZZOOSrokKRLqv4QCioCpjEYMUQp6V9steBwJ/DE0MLZX3+9r/YCaQ207cyCOBfBtCIfU1NZgazD8UduigMM7e1hKUxIfYR6BA/yd+KeqR2JO8DvhRnwhmTm5IRDRDUMrc3HHq4Q/BgdAqeJDpCvS5N1OJQI=; X-YMail-OSG: KWBN5yYVM1mWvZ.IawrKk__HX5uFazabWbSW8aRjoVnO02DEeN_NuYEUEv68LVXlhI0ftlU0vMJuKxM5XLLDSLGuUdKSL7isq_F6STiCcctz7bTwa23SoSD1agk- Received: from [84.165.234.163] by web26909.mail.ukl.yahoo.com via HTTP; Mon, 26 Nov 2007 23:52:50 GMT X-Mailer: YahooMailRC/818.27 YahooMailWebService/0.7.157 Date: Mon, 26 Nov 2007 23:52:50 +0000 (GMT) From: Jeffrey Brendecke Subject: v8.1: Error severity on libpq PGconn* To: pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <315963.85252.qm@web26909.mail.ukl.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.703 tagged_above=0 required=5 tests=AWL=-1.258, BAYES_50=0.001, RCVD_IN_BL_SPAMCOP_NET=1.96 X-Spam-Level: X-Archive-Number: 200711/16 X-Sequence-Number: 6660 Is there a recommended way to get the error severity (ERROR vs. FATAL vs. P= ANIC, etc.) off a PGconn* as there is for a PGresult* using PQresultErrorFi= eld()?=0A=0AFor example, when I pass in a non-existent database name when c= reating a connection, I get the following message:=0A=0AFATAL: database "x= xxxxx" does not exist=0A=0Aas returned by PQerrorMessage().=0A=0AThis messa= ge format does not fit into my messaging framework and the status returned = from PQstatus() is unfortunately too vague to be of use in this regard.=0A= =0A=0AI would like to avoid parsing the message, chopping off the text up t= o the double space, and do some sort of lookup on the preceeding localized = text to determine the severity.=0A=0AThe 8.1 docs say there is no PQerrorFi= eld() function and the 8.2 and 8.3 docs make the same disclaimer.=0A=0AI sa= w some mails back from 2003 in the archives that seem to propose such a sol= ution as PQerrorField(), but it appears to have never been implemented.=0A= =0AThanks very much.=0A=0A=0A=0A=0A _________________________________= _ Ihre erste Baustelle? Wissenswertes f=FCr Bastler und Hobby Handwerker. = www.yahoo.de/clever