BUG #17981: HY000 server closed the connection unexpectedly

From: Sayan Oruspay <sayanoruspai(at)gmail(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: BUG #17981: HY000 server closed the connection unexpectedly
Date: 2023-06-20 08:38:32
Message-ID: CANdk+b+eSm05tBKLFLXFa4j+CxC6+_XtyZfu5t2tqjpeDXB4Lw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

I am writing an application on Windows that connects to the local database
through psqlodbc. I want to make it automatically detect connection loss
and reconnect. When I manually stop the database service and try to send a
query, I get an error with sqlstate HY000 and the message ' server closed
the connection unexpectedly'. Shouldn't sqlstate be something like 08S01?
Also SQLGetConnectAttr with SQL_ATTR_CONNECTION_DEAD does not produce the
right value. The value it returns is always SQL_CD_FALSE.

Browse pgsql-odbc by date

  From Date Subject
Next Message Tom Hughes 2023-06-20 12:47:11 [PATCH] Allow catalog (database) enumeration with SQLTables
Previous Message Huang, Yang 2023-06-16 06:44:30 Bug report - ODBC Driver - Postgresql ODBC driver crash found in customer environment