SQLError SqlState wrong when postgres backend dies

Поиск
Список
Период
Сортировка
От Jeremy Faith
Тема SQLError SqlState wrong when postgres backend dies
Дата
Msg-id CO1P132MB000639ADBF6C92A86BDE833B85C80@CO1P132MB0006.NAMP132.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответы Re: SQLError SqlState wrong when postgres backend dies
Список pgsql-odbc

Hi,


The SQLError function is returning the last statement level SqlState value if called after the postgres backend dies.

For exampel, if prior to the death of the postgres backend the last SQL statement that had an error returned an SqlState="23505"(due to a unique index problem) then after the postgres backend dies the next SQL statement will fail and SQLError returns:-

  NativeError=26 SqlState="23505" ErrorMsg=Could not send Query(connection dead)

So ErrorMsg is correct but SqlState is not.


I was using psqlodbc-09.05.0400 but repeated my test with 10.01.0000 and got the same result.


Note:I know SQLError is deprecated and that SQLGetDiagRec should be used instead but I have a comment in my code that indicates I was getting a segfault with the postgres ODBC driver when I used SQLGetDiagRec(this would have been from some years ago).


Regards,

Jeremy Faith

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

Предыдущее
От: "Inoue, Hiroshi"
Дата:
Сообщение: Re: Patch for an encoding bug in the derive_locale_encoding function
Следующее
От: Farhana Reid
Дата:
Сообщение: help with downloading postgres server and client