Re: parsing SQLERRM ? - Mailing list pgsql-general

From Tom Lane
Subject Re: parsing SQLERRM ?
Date
Msg-id 29294.1339779008@sss.pgh.pa.us
Whole thread Raw
In response to Re: parsing SQLERRM ?  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List pgsql-general
"Albe Laurenz" <laurenz.albe@wien.gv.at> writes:
> david.sahagian@emc.com wrote:
>> In my PL/pgSQL stored functions,
>> I want to be able to distinguish which FK-constraint caused the
>> [foreign_key_violation] exception.
>> Is a "robust enough" parsing of SQLERRM actually the best/only way to
>> determine this ?

> I think so.

Yeah, at the moment.  There are plans to fix this, but it won't happen
before 9.3 at the earliest.

            regards, tom lane

pgsql-general by date:

Previous
From: John Lumby
Date:
Subject: INSERT INTO...RETURNING with partitioned table using trigger/rule
Next
From: Tom Lane
Date:
Subject: Re: Get RULE condition and commands