select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

SQLSTATE / CLASS 08 · CONNECTION EXCEPTION

sqlserver_rejected_establishment_of_sqlconnection

SQLSTATE
08004
Condition name
sqlserver_rejected_establishment_of_sqlconnection
Class
Connection Exception
Source macro
ERRCODE_SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION
Evidence
Definition only
Analysis & operational context

English SQLSTATE atlas: authored explanations and source/runtime evidence are separate from the manual definitions. View source ↗

<h1>08004</h1>

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.

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.

Sources

  • src.errcodes.18.6src/backend/utils/errcodes.txt at REL_18_6 commit 724edf9bde9d356724ad384a2e196edc3c9f80f7; fixed blob SHA-256 6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba (source).
  • src.calls.REL_18_6 / src.calls.REL_10_23 — fixed local call scans, SHA-256 9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf / 00d16d3eb01b71ccf1b245c8f3102f9d0ec9f36fb02777b8dd1b99fcb263040c; these scans preserve the resolved call context used by the claims.

Source evidence

Evidence belongs to the frozen source and runtime versions listed here. It is not a runtime verification of the selected manual version.

08004 is the sqlserver_rejected_establishment_of_sqlconnection condition in Class 08.

Method: Read the fixed errcodes.txt definition and the locked catalogue metadata.

Limits: Directory identity does not identify every backend or client path.

src.errcodes.18.6

The fixed core scans contain no resolved PostgreSQL throw site for 08004. Keep the SQL-standard definition separate from concrete startup codes such as 28000 and 28P01.

Method: Trace the fixed REL_18_6 and REL_10_23 source call scans and the recorded source paths.

Limits: This is a bounded source claim; it is not an observed natural SQLSTATE case.

src.calls.REL_18_6 src.calls.REL_10_23

The locked catalogue records 08004 in the listed snapshots; this definition/source-only page has no selected natural runtime and only compares the fixed catalogue and bounded REL_18_6/REL_10_23 call-scan records.

Method: Read the generated facts block and bounded fixed source/call-scan records; no runtime target summaries are used.

Limits: Presence in a definition file is not an exact behavioral introduction; this scope establishes no resolved fixed core emitter or universal message template and does not prove every intermediate release.

src.errcodes.18.6 src.calls.REL_18_6 src.calls.REL_10_23

Message templates

No extracted message template is attached to this condition.

Reproduction & repair cases

source_boundary · PG 10, 18

Preconditions

  • A runner-owned disposable target is provisioned only if a source-boundary smoke run is requested.

Trigger: No artificial SQL trigger is executed; this record preserves the fixed source/definition boundary.

Expected assertions

    Repair: Use the concrete source path or component-specific documentation when it applies.

    Cleanup: Drop the case schema with an owner connection.

    Recorded runtime evidence

    No runtime observation is attached to this entry.

    Definition snapshot: english-manuals:56868409406730c2170a2685927… · English manual source