X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1723C5288E for ; Thu, 2 Jun 2005 12:25:31 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 33841-04 for ; Thu, 2 Jun 2005 15:25:25 +0000 (GMT) Received: from web11.manitu.net (web11.manitu.net [217.11.48.111]) by svr1.postgresql.org (Postfix) with ESMTP id F170752872 for ; Thu, 2 Jun 2005 12:25:20 -0300 (ADT) Received: from tschibtschibojtschitsch (dsl-082-082-190-026.arcor-ip.net [82.82.190.26]) (authenticated) by web11.manitu.net (8.10.2-SOL3/8.10.2) with ESMTP id j52FPMT13067 for ; Thu, 2 Jun 2005 17:25:23 +0200 Subject: getting details about integrity constraint violation From: Markus Bertheau To: "'PostgreSQL'" Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-mKWsGMRy1EFSKRbbZYVI" Date: Thu, 02 Jun 2005 17:25:16 +0200 Message-Id: <1117725916.7345.2.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.115 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/25 X-Sequence-Number: 21626 --=-mKWsGMRy1EFSKRbbZYVI Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, how would I find out details about for example what constraint was violated by an insert statement? The SQL state tells me, that a unique constraint was violated, but it doesn't say which one. I cannot sensibly react to such errors if I don't know what exactly happened. I'd like to avoid parsing the text error message because it can be different depending on the LC_MESSAGES the server / libpq runs with. Markus --=20 Markus Bertheau --=-mKWsGMRy1EFSKRbbZYVI Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBCnyTb2RUnMPztcykRAi4HAJ9/Bw/7vWhozl7yBizxQOT0im688ACfQguu K7NLLPHeSfGz6LK132AvKvk= =oPD7 -----END PGP SIGNATURE----- --=-mKWsGMRy1EFSKRbbZYVI--