Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qBYjk-0008Ol-4V for pgsql-odbc@arkaria.postgresql.org; Tue, 20 Jun 2023 10:37:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qBYjj-000738-3I for pgsql-odbc@arkaria.postgresql.org; Tue, 20 Jun 2023 10:37:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qBWsw-0002Z6-Ry for pgsql-odbc@lists.postgresql.org; Tue, 20 Jun 2023 08:38:46 +0000 Received: from mail-vk1-xa2c.google.com ([2607:f8b0:4864:20::a2c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qBWsu-003CqM-2p for pgsql-odbc@postgresql.org; Tue, 20 Jun 2023 08:38:45 +0000 Received: by mail-vk1-xa2c.google.com with SMTP id 71dfb90a1353d-471740b7e00so1121677e0c.1 for ; Tue, 20 Jun 2023 01:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687250323; x=1689842323; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=YMgLWgzEfORRmWFp+s+KxLk/ofIKMZg/uTtNvfhg0ns=; b=UYO3VfnNkw4iIAUvRsp6JpiupPkqJf0nzbmqcJv0w8350nfjWk8NTmeTwDnCXWuSiV i0VLV4zoJK8Soggx564gZDvblwZVOBNYp02Kx6GdE1X8KkWJZJCMmLVq9gOXnTL+2i7u LGytJba10GKOr/f3C/xewjI07Hu6dsT4hofvGCfTUextRsoguWpYBjAq7dwzi+J09Fm+ Jb/jMO4pe0qA7VE0JYWSndCWCGNLER9gcRtduLkGcUb4cf0LhdnaBrlIRigKcZs4eCqG A4miXzM66arF+QylIaww0tuc4wyWRF1+1Urva3TvQxAsP/QcczCidfB45AfY4vDhNysa vEpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687250323; x=1689842323; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YMgLWgzEfORRmWFp+s+KxLk/ofIKMZg/uTtNvfhg0ns=; b=aAJGARblfv5VffVZAfIgONTnp3DqM34QpnciL18PE9hSz3jtS3FXODyETeVLFb20NY 1GCudmGmK8oiXWmhpOAY28ULV3i/aQWKlhgvy17+wKX0wweE1JuEz7caMt8gSzGZIWe1 5hMoE6Iyds9jRt+PBgklkTQKjzJftcUQmUHJ/bLGM6fq11nxXSaLBph7MG/sJYHt+Dcr UI18+DkyIiAgMSIcpgSV/H2gOvqJ7QVv/MB1/GOe6ppXuoW71VBReYwDGLW8y2Iu1EJq eXqANX1e4jfWrykDg0yuCa3iiDaM/he8Dl7YTLG9yH0wAFcPZXwm/ok1WRiWKmqy6rfp M7Yg== X-Gm-Message-State: AC+VfDxv4c559US3ZmuI1DreKMW0GV2zWxuwVkTmjoCKRh2663gumD+v aBNxCNXMML2Rni7YncNXwOVpuCw3XwUIv1UXOu4DUEJonOw= X-Google-Smtp-Source: ACHHUZ6Eu8y7mGg8k8PwrHBhbLmxRwltJAmvzNIPCyp/Mb8Um6FUDKRvYdRcIlog1fcHBzkYZmSe88vVE51oygh/z5Y= X-Received: by 2002:a1f:3d94:0:b0:46d:d5c1:8c2a with SMTP id k142-20020a1f3d94000000b0046dd5c18c2amr4079245vka.16.1687250322975; Tue, 20 Jun 2023 01:38:42 -0700 (PDT) MIME-Version: 1.0 From: Sayan Oruspay Date: Tue, 20 Jun 2023 15:38:32 +0700 Message-ID: Subject: BUG #17981: HY000 server closed the connection unexpectedly To: pgsql-odbc@postgresql.org Content-Type: multipart/alternative; boundary="00000000000025f14805fe8b94c0" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000025f14805fe8b94c0 Content-Type: text/plain; charset="UTF-8" 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. --00000000000025f14805fe8b94c0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am writing an application on Windows that connects to th= e local database through psqlodbc. I want to make it automatically detect c= onnection 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 &#= 39; server closed the connection unexpectedl= y'. Shouldn't sqlstate be something like 08S01? Also=C2=A0 SQLGetConnectAttr with SQL_ATTR_CONNECTION_DEAD does not produce the right = value. The value it returns is always SQL_CD_FALSE.
--00000000000025f14805fe8b94c0--