08004 — sqlserver_rejected_establishment_of_sqlconnection
08004
At a glance
SQLSTATE 08004 is sqlserver_rejected_establishment_of_sqlconnection in Class 08. 08004 is the SQL-standard name for a server-rejected connection establishment. The fixed PostgreSQL 18.6 and 10.23 core-call scans contain no resolved PostgreSQL ereport path for this code.
| Field | Value |
|---|---|
| SQLSTATE | 08004 |
| Condition | sqlserver_rejected_establishment_of_sqlconnection |
| Status | active |
| Known present by | 7.4 |
| Locked snapshots | 9.0.23, 9.1.24, 9.2.24, 9.3.25, 9.4.26, 9.5.25, 9.6.24, 10.23, 11.22, 12.22, 13.23, 14.24, 15.19, 16.15, 17.11, 18.6, 19beta3 |
| Macros | ERRCODE_SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION |
| Aliases | — |
Meaning
08004 is the SQL-standard name for a server-rejected connection establishment. The fixed PostgreSQL 18.6 and 10.23 core-call scans contain no resolved PostgreSQL ereport path for this code.
Diagnosis
Use the server ErrorResponse and authentication logs to identify the concrete condition. PostgreSQL paths in this scope use specific codes such as 28000 or 28P01; a client-side exception without a server field is not evidence for 08004.
Response
Fix the actual authentication, authorization, or endpoint problem and open a new connection. Keep 08004 as a definition/reference boundary here; no synthetic RAISE or fake rejected-login case is claimed.
Messages
This scope has no confirmed fixed primary-message template for 08004; the available definition/source records do not establish one. Do not treat a client exception without a matching server diagnostic as proof of 08004.
Representative case
This page has no selected natural SQL run. The structured evidence records a source or definition boundary; a client-side RAISE would not represent a backend mechanism.
Versions
The generated facts table records the locked catalogue snapshots and earliest observed definition. This page has no selected natural SQL run; its fixed REL_18_6/REL_10_23 source boundary must not be read as an observed runtime result or as a claim about every intermediate release.
Related
08001— sqlclient_unable_to_establish_sqlconnection28000— invalid_authorization_specification28P01— related condition
Sources
src.errcodes.18.6—src/backend/utils/errcodes.txtatREL_18_6commit724edf9bde9d356724ad384a2e196edc3c9f80f7; fixed blob SHA-2566e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba(source).src.calls.REL_18_6/src.calls.REL_10_23— fixed local call scans, SHA-2569ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf/00d16d3eb01b71ccf1b245c8f3102f9d0ec9f36fb02777b8dd1b99fcb263040c; these scans preserve the resolved call context used by the claims.