Re: Foreign key constraint & getErrorCode

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Foreign key constraint & getErrorCode
Дата
Msg-id 41422E22.1010104@opencloud.com
обсуждение исходный текст
Ответ на Foreign key constraint & getErrorCode  (Ian Pilcher <i.pilcher@comcast.net>)
Ответы Re: Foreign key constraint & getErrorCode
Список pgsql-jdbc
Ian Pilcher wrote:

> Based on my reading of the PostgreSQL docs, getErrorCode should be
> returning 23503.  Any idea what's going on?

Try SQLException.getSQLState() instead. The backend returns (somewhat
standardized) alphanumeric SQL states with errors and the driver exposes
these as via getSQLState(). getErrorCode() is numeric, vendor-specific,
and unused by the current driver.

You may also need to upgrade your JDBC driver; I don't know how recent
the driver in the RPMs you are using is.

-O

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

Предыдущее
От: Ian Pilcher
Дата:
Сообщение: Foreign key constraint & getErrorCode
Следующее
От: Ian Pilcher
Дата:
Сообщение: Re: Foreign key constraint & getErrorCode