UNIQUE_VIOLATION, Finding out which index would have been violated

From: Petri Simolin <petrisimolin(at)petrisimolin(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: UNIQUE_VIOLATION, Finding out which index would have been violated
Date: 2007-09-25 05:57:42
Message-ID: 7d38f174e0790e19597486f00f088974@mail.petrisimolin.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings list,

I have created a function which inserts a row in a table which has 2 unique
indexes on two different columns.

I was wondering if there is a way in case of UNIQUE_VIOLATION exception to
find out which index would have been violated?

Petri Simolin

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2007-09-25 06:46:38 Re: [Urgent] Regexp_replace question
Previous Message Conal 2007-09-25 05:41:44 Poor performance with ON DELETE CASCADE