select open change scope Open full search

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

SQLSTATE / CLASS 22 · DATA EXCEPTION

invalid_json_text

SQLSTATE
22032
Condition name
invalid_json_text
Class
Data Exception
Source macro
ERRCODE_INVALID_JSON_TEXT
Evidence
Definition only
Analysis & operational context

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

<h1>22032</h1>

At a glance

JSON text is invalid for the consuming operation. No fixed 18.6 emitting report group was resolved in the bounded scan.

Meaning

The locked definition names invalid_json_text, but the bounded PostgreSQL 18.6 source review did not resolve a native emitting report group for this code. This page therefore does not assign a parser function, primary text, DETAIL, HINT, severity path, or SQL/JSON mode from the condition name alone.

Diagnosis

If 22032 appears, preserve the complete diagnostic and the consuming operation, including whether the input was json, jsonb, SQL/JSON, or an extension value. Validate the exact text and encoding at that boundary, but do not replace the unknown emitter with a guessed ordinary cast or client path. Related JSON cardinality codes have their own fixed guards.

Response

Use the actual emitter’s primary, DETAIL, and HINT to repair the JSON text or its boundary. If the operation is in an explicit transaction and raises ERROR, roll back or roll back to the existing savepoint before retrying; autocommit can retry corrected input. This recovery guidance is general and is not a 22032 runtime observation.

Versions

The locked catalogue records this condition from 12.0. Only the PostgreSQL 18.6 definition row is fixed here; no native emitting path or natural runtime observation is claimed.

Sources

The fixed definition row is src/backend/utils/errcodes.txt#L217. The bounded source review did not resolve a native 22032 emitter; the structured evidence record keeps that unknown scope explicit, and no natural runtime was run.

Source evidence

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

22032 is invalid_json_text in SQLSTATE Class 22.

Method: Read fixed definition.

src.errcodes.18.6

No fixed PostgreSQL 18.6 emitting path was resolved for 22032 in the bounded scan.

Method: Retain definition evidence without inventing an emitter.

Limits: A bounded scan does not prove no extension or historical path exists.

src.errcodes.18.6

The locked catalogue records 22032 from 12.0 without proving exact implementation introduction.

Method: Use catalogue boundary.

src.errcodes.18.6

Message templates

No extracted message template is attached to this condition.

Reproduction & repair cases

No reproduction case is attached to this condition.

Recorded runtime evidence

No runtime observation is attached to this entry.

Version history 1
  1. PG 11 → 12added

Definition snapshot: english-manuals:c1d17fa118712e0d3c6b328407c… · English manual source