Custom Contraint Violation Errors

Поиск
Список
Период
Сортировка
От Michael Musenbrock
Тема Custom Contraint Violation Errors
Дата
Msg-id 20111104065622.135750@gmx.net
обсуждение исходный текст
Ответы Re: Custom Contraint Violation Errors  (Richard Broersma <richard.broersma@gmail.com>)
Список pgsql-general
Hi,

I'm looking for a way to create a custom, for our application parsable,
error message on constraint violation.
The perfect thing would be, having table names, schemas and primary keys
in that error message.

My first thought was to create a function which gets triggered by the
constraint violation, which creates the custom error. But I have not
found any information if this is possible to create a trigger on a
constraint violation, and if yes, how could that be done?

I would be glad, If someone could light me up on that issue.

Thanks in advance and Kind Regards,
Michael
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

В списке pgsql-general по дате отправления:

Предыдущее
От: Steve Murphy
Дата:
Сообщение: What is *wrong* with this query???
Следующее
От: Graham Murray
Дата:
Сообщение: Re: postgresql-9.1.1 PQescapeByteaConn() generating incorrectly quoted output.