The following bug has been logged on the website:
Bug reference: 17981
Logged by: Sayan Oruspay
Email address: sayanoruspai@gmail.com
PostgreSQL version: 12.1
Operating system: Windows 10
Description:
I am writing an application that connects to the local database through
psqlodbc version 13.02. And when I manually stop my database service, I get
sqlstate HY000 and message 'server closed the connection unexpectedly ...'.
Should not it be something like 08S01? Also SQLGetConnectAttr(GetHandle(),
SQL_ATTR_CONNECTION_DEAD, &dead, SQL_IS_INTEGER, nullptr); does not produce
right answer and dead is returned equal to SQL_CD_FALSE.