pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #17981: HY000 server closed the connection unexpectedly
2+ messages / 2 participants
[nested] [flat]
* BUG #17981: HY000 server closed the connection unexpectedly
@ 2023-06-19 11:52 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2023-06-19 11:52 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: sayanoruspai@gmail.com
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.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #17981: HY000 server closed the connection unexpectedly
@ 2023-06-19 13:34 Laurenz Albe <laurenz.albe@cybertec.at>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Laurenz Albe @ 2023-06-19 13:34 UTC (permalink / raw)
To: sayanoruspai@gmail.com; pgsql-bugs@lists.postgresql.org
On Mon, 2023-06-19 at 11:52 +0000, PG Bug reporting form wrote:
> 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.
08S01 is not a standard-defined SQLSTATE. The standard says: Subclass values
associated with such classes that begin with one of the <digit>s'5', '6', '7',
'8', or '9' or one of the <simple Latin upper case letter>s 'I', 'J', 'K', 'L',
'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', or 'Z' are
reserved for implementation-defined conditions and are called implementation-
defined subclasses.
A web search shows that 08S01 is MySQL-specific. I don't think that that is
necessarily better than HY000, which is defined as an unspecified C API
error by the SQL standard.
About SQLGetConnectAttr, you should probably ask the ODBC mailing list
pgsql-odbc@postgresql.org
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-06-19 13:34 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-06-19 11:52 BUG #17981: HY000 server closed the connection unexpectedly PG Bug reporting form <noreply@postgresql.org>
2023-06-19 13:34 ` Laurenz Albe <laurenz.albe@cybertec.at>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox