trapping errors in plpgsql?

Поиск
Список
Период
Сортировка
От CSN
Тема trapping errors in plpgsql?
Дата
Msg-id 20051031224705.78851.qmail@web52913.mail.yahoo.com
обсуждение исходный текст
Ответы Re: trapping errors in plpgsql?  (Teguh R <priska@hotpop.com>)
Список pgsql-general
I have a table like so:
id|username|email

with unique indices on username and email. In a
plpgsql function if an insert fails because of a
duplicate on one of those fields, is it possible to
trap the error, figure out which unique fields it
applies to, and raise a custom error message?

Thanks,
CSN




__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Starting PostgreSQL 8.0.4 with more memory [FreeBSD
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Starting PostgreSQL 8.0.4 with more memory [FreeBSD