Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 34C222E0157 for ; Sun, 25 Nov 2007 22:48:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 37624-02 for ; Sun, 25 Nov 2007 22:48:04 -0400 (AST) Received: from web26905.mail.ukl.yahoo.com (web26905.mail.ukl.yahoo.com [217.146.176.94]) by postgresql.org (Postfix) with SMTP id C8CDB2E015A for ; Sun, 25 Nov 2007 22:48:12 -0400 (AST) Received: (qmail 41690 invoked by uid 60001); 26 Nov 2007 02:48:10 -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=BZ6VaNjvAN6NtsNg9ti+Vu2gwabI09PATKqjPRDwUhyZkjUeKdxuD3h3lzJTyQSLBs8PvWB9TfQaUgsqVtAVECtmZ2jFLVE2T3wkDB/1FFNO7ObLpPGY1B3WgPp+LKWGSWGizCXqnTuGpL7a1dz+rOzi1+pkx5vS3voNuw2oMGE=; X-YMail-OSG: C5XjfykVM1lsZ8vLq..y6i4daFUGZurwWxF5pX1XeQAYeipQb03cx3X1l2MvtZZ4RFCiD9DrpIpPDhqEkY_.bTHhUwS8YodhJFtZmq0SIebmzNqNP_aibouCvJg- Received: from [84.165.228.78] by web26905.mail.ukl.yahoo.com via HTTP; Mon, 26 Nov 2007 02:48:10 GMT X-Mailer: YahooMailRC/818.27 YahooMailWebService/0.7.157 Date: Mon, 26 Nov 2007 02:48:10 +0000 (GMT) From: Jeffrey Brendecke Subject: Retrieving multiple error messages via libpq To: pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <798544.38898.qm@web26905.mail.ukl.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200711/14 X-Sequence-Number: 6658 I am working on a client that interfaces to the database via libpq, but can= not see how to get all error messages in some cases.=0A=0AFor testing purpo= ses, I created the following table:=0A=0ACREATE TABLE IdOnly=0A(=0A id = INTEGER PRIMARY KEY=0A);=0A=0AWhen I submit the following SQL s= tatement for execution via the psql client:=0A=0A'BEGIN TRANSACTION; INSERT= INTO IdOnly (id) VALUES (40); INSERT INTO IdOnly (id) VALUES (21); INSERT = INTO IdOnly (id) VALUES (42); COMMIT TRANSACTION;'=0A=0AI get the following= error messages (this failure is expected):=0A=0AERROR: duplicate key viol= ates unique constraint "idonly_pkey"=0AERROR: current transaction is abort= ed, commands ignored until end of transaction block=0A=0AHowever, when retr= eiving the error message via PQresultErrorMessage(), I get:=0AERROR: dupli= cate key violates unique constraint "idonly_pkey"=0A=0Aand through PQresult= ErrorField(, PGresult*, PG_DIAG_MESSAGE_PRIMARY ), I get only:=0Aduplicate = key violates unique constraint "idonly_pkey"=0A=0ACalling PQresultErrorFiel= d( PGresult*, PG_DIAG_MESSAGE_DETAIL )" returns no additional information.= =0A=0AHow is the additional error message retrieved?=0A=0A=0A=0A=0A=0A=0A= =0A=0A Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: =0Ahttp://de= .yahoo.com/set