getting details about integrity constraint violation

From: Markus Bertheau <twanger(at)bluetwanger(dot)de>
To: "'PostgreSQL'" <pgsql-sql(at)postgresql(dot)org>
Subject: getting details about integrity constraint violation
Date: 2005-06-02 15:25:16
Message-ID: 1117725916.7345.2.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)bluetwanger(dot)de>

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message KÖPFERL Robert 2005-06-02 15:33:59 Splitting a table for performance reasons
Previous Message Richard Huxton 2005-06-02 12:40:53 Re: [SQL] index row size 2728 exceeds btree maximum, 27