Re: getting details about integrity constraint violation

Поиск
Список
Период
Сортировка
От PFC
Тема Re: getting details about integrity constraint violation
Дата
Msg-id op.srs4w8kzth1vuj@localhost
обсуждение исходный текст
Ответ на Re: getting details about integrity constraint violation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: 'true'::TEXT::BOOLEAN
Следующее
От: Rajesh Kumar Mallah
Дата:
Сообщение: Tsearch2 headline usage