Re: catch SQLException, error code for Foeign key violation,

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: catch SQLException, error code for Foeign key violation,
Дата
Msg-id Pine.BSO.4.63.0604171812200.11226@leary2.csoft.net
обсуждение исходный текст
Ответ на catch SQLException, error code for Foeign key violation,  ("surabhi.ahuja" <surabhi.ahuja@iiitb.ac.in>)
Список pgsql-general

On Mon, 17 Apr 2006, surabhi.ahuja wrote:

> The question is that is from this SQLException can i detect if it is a
> foreign key violation,
>

You should check the value of SQLException.getSQLState() against this
table:
http://www.postgresql.org/docs/8.1/static/errcodes-appendix.html

Kris Jurka

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

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Re: tsearch partial word
Следующее
От: Peter Wilson
Дата:
Сообщение: Re: plpgsql replication stored procedure