UNIQUE_VIOLATION exception, finding out which index would have been violated

From: Petri Simolin <petrisimolin(at)petrisimolin(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: UNIQUE_VIOLATION exception, finding out which index would have been violated
Date: 2007-09-25 06:55:37
Message-ID: 73d342e61372005424c70b511527b1b4@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 am wondering, if there is a way in case of UNIQUE_VIOLATION exception to
find out which index would have been violated?

Petri Simolin

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Phoenix Kiula 2007-09-25 07:07:56 Re: [Urgent] Regexp_replace question
Previous Message Michael Fuhr 2007-09-25 06:46:38 Re: [Urgent] Regexp_replace question