Exception handling from trigger

Поиск
Список
Период
Сортировка
От Vlad Dimitriu
Тема Exception handling from trigger
Дата
Msg-id 4117AA90.9080704@base.ro
обсуждение исходный текст
Ответы Re: Exception handling from trigger  (Rod Taylor <pg@rbt.ca>)
Re: Exception handling from trigger  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Hello,

I would like to handle the exceptions that a database returns. For example,
if a "mycolumn" column is defined as varchar(64), I'd like to catch
if the new.mycolumn is larger than 64 with my own trigger
(for cutoms, internationalized messages, etc ..). So I did,
but the database catch this error before my 'before insert'-trigger
(using character_length(new.mycolumn) ...).

Is this way of handling exceptions possible in postgres ?
If so, what is the normal way to handle this exceptions, from a
plpgsql/trigger(rule??) perspective ?


Thank you ...


Vlad Dimitriu



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

Предыдущее
От: Matt Nuzum
Дата:
Сообщение: Suggestions on storing re-occurring calendar events
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: Exception handling from trigger