getting details about integrity constraint violation - Mailing list pgsql-sql

From Markus Bertheau
Subject getting details about integrity constraint violation
Date
Msg-id 1117725916.7345.2.camel@localhost.localdomain
Whole thread Raw
Responses Re: getting details about integrity constraint violation  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: getting details about integrity constraint violation  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-sql
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

--
Markus Bertheau <twanger@bluetwanger.de>

pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: [GENERAL] index row size 2728 exceeds btree maximum, 27
Next
From: KÖPFERL Robert
Date:
Subject: Splitting a table for performance reasons