Skip to content

2203A — sql_json_member_not_found

Source-backed reference for PostgreSQL SQLSTATE 2203A.

2203A

At a glance

A named JSON object member cannot be read from the current item. Fixed jsonpath member access distinguishes a missing key from a non-object receiver.

Field Value
SQLSTATE 2203A
Condition sql_json_member_not_found
Status active
Known present by 12.0
Locked snapshots 12.22, 13.23, 14.24, 15.19, 16.15, 17.11, 18.6, 19beta3
Macros ERRCODE_SQL_JSON_MEMBER_NOT_FOUND
Aliases

Messages

Representative primary texts are:

Guard Primary
Named key is absent from an object JSON object does not contain key "%s"
Member accessor receives a non-object jsonpath member accessor can only be applied to an object

Meaning

The jpiKey branch searches the current JSON object for the requested key. A missing key raises 2203A in a throwing context; a scalar or other non-object receiver uses the same SQLSTATE with the object-type primary. If structural errors are ignored, the mismatch can be skipped, and if the context is non-throwing the path returns an error result for its caller to handle. This is the named-member boundary; wildcard member access and .keyvalue() use the object-only 2203C path.

Diagnosis

Keep the requested key, the item immediately before the member accessor, and the path mode. A missing key may reflect document shape, while a non-object receiver means the path reached the wrong type. Do not turn a missing member into 22035 no-item or a wildcard/object-method mismatch into 2203C without reading the primary.

Response

Correct the key or normalize/branch on the document shape. Use the path’s documented lax or error behavior only when a missing member is an intended input case. If an ERROR occurred in an explicit transaction, roll back or roll back to the existing savepoint before retrying; autocommit can retry the corrected action.

Versions

The locked catalogue records this condition from 12.0; the fixed named-member guards are PostgreSQL 18.6. No natural runtime observation is claimed for this page.

22039, 2203C, 22035

Sources

The fixed named-member lookup, missing-key, non-object, and structural-error branches are jsonpath_exec.c#L1012-1055. The shared strict/lax and throw-return macros are jsonpath_exec.c#L235-249. The structured evidence record binds both exact primaries; no natural runtime was run.