Re: trapping errors in plpgsql?

Поиск
Список
Период
Сортировка
От Teguh R
Тема Re: trapping errors in plpgsql?
Дата
Msg-id 4367254A.1000401@hotpop.com
обсуждение исходный текст
Ответ на trapping errors in plpgsql?  (CSN <cool_screen_name90001@yahoo.com>)
Список pgsql-general
CSN wrote:

>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
>
>---------------------------(end of broadcast)---------------------------
>TIP 9: In versions below 8.0, the planner will ignore your desire to
>       choose an index scan if your joining column's datatypes do not
>       match
>
>
>


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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: How may I keep prepended array items positive?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: after insert or update or delete of col2