Re: getting details about integrity constraint violation - Mailing list pgsql-sql

From PFC
Subject Re: getting details about integrity constraint violation
Date
Msg-id op.srs4w8kzth1vuj@localhost
Whole thread Raw
In response to Re: getting details about integrity constraint violation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
> The "error fields" facility in the FE/BE protocol could be extended
> in that direction, and I think there's already been some discussion
> about it; but no one has stepped up with a concrete proposal, much
> less volunteered to do the work ...
Um, if changing the protocol is a bother, you could also add parseable  
infos to the error messages...

instead of  :
"ERROR: duplicate key violates unique constraint "testinteg_one_key""

it would say
"ERROR: duplicate key violates unique constraint "testinteg_one_key"
[code:"XXXX" error:"integrity" type:"unique" column:"something"  
constraint:"testinteg_one_key"]"
Which could be hackfully added by a "parseable" locale (but with a  more  
restrained form...)SET lc_messages TO parseable

>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>




pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: 'true'::TEXT::BOOLEAN
Next
From: Rajesh Kumar Mallah
Date:
Subject: Tsearch2 headline usage