custom error messages/numbers

Поиск
Список
Период
Сортировка
От BARTKO Zoltan
Тема custom error messages/numbers
Дата
Msg-id 001601c44407$6cf6f400$0e5d10ac@antik.org
обсуждение исходный текст
Ответы Re: custom error messages/numbers  (Richard Huxton <dev@archonet.com>)
Re: custom error messages/numbers  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Folks,
 
I am developing an app for PostgreSQL, entirely with stored functions (somewhat resembling the object-oriented approach. In fact it is not an app, just an API). All my functions return an integer value - 0 if the function was successful, another value otherwise.
 
Until now, all parameter checking was done manually in the stored function (if param is null then return -8; end if; etc.) This makes things quite lengthy.
 
I know about check constraints. However, upon error they throw an error message and abort the current transaction, So my question is: is there any possible way of throwing my own error messages upon a check constraint violation? 
 
Thank you very much
 
Zoltan Bartko

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

Предыдущее
От:
Дата:
Сообщение: Re: Naive schema questions
Следующее
От: Ulrich Meis
Дата:
Сообщение: Howto handle views/Rules Privileges