sqlstate is HY000 for not_null_violation

Поиск
Список
Период
Сортировка
От ning
Тема sqlstate is HY000 for not_null_violation
Дата
Msg-id 27f31620908200047w2698c18aof7e72eddfdd5722b@mail.gmail.com
обсуждение исходный текст
Ответы Re: sqlstate is HY000 for not_null_violation  (Hiroshi Inoue <inoue@tpf.co.jp>)
Список pgsql-odbc
Hi,

I am using psqlodbc08.02.0400 with unixODBC connecting to PostgreSQL8.2.4.

For not_null_violation error, like
db=# create temp table ooid (oid_ integer not null);
CREATE TABLE
db=# insert into ooid values(NULL);
ERROR:  null value in column "oid_" violates not-null constraint

The sqlstate returned by SQLGetDiagRec() is HY000, the message is
SQLSTATE=HY000;SQLCODE=7;ERROR:  null value in column "oid_" violates
not-null constraint;Error while executing the query

which should be SQLSTATE=23502 according to
http://www.postgresql.org/docs/8.2/static/errcodes-appendix.html

Any idea to get 23502 instead of HY000?

Greeatings,
ning

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

Предыдущее
От: Richard Neill
Дата:
Сообщение: Re: ODBC 64-bit driver request
Следующее
От: "Adnan DURSUN"
Дата:
Сообщение: ODBC driver & connection limit