UNIQUE_VIOLATION, Finding out which index would have been violated - Mailing list pgsql-general

From Petri Simolin
Subject UNIQUE_VIOLATION, Finding out which index would have been violated
Date
Msg-id 7d38f174e0790e19597486f00f088974@mail.petrisimolin.com
Whole thread Raw
List 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


pgsql-general by date:

Previous
From: Conal
Date:
Subject: Poor performance with ON DELETE CASCADE
Next
From: Dan99
Date:
Subject: Re: PG_DUMP not working