select open change scope Open full search

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

SQLSTATE / CLASS 22 · DATA EXCEPTION

data_exception

SQLSTATE
22000
Condition name
data_exception
Class
Data Exception
Source macro
ERRCODE_DATA_EXCEPTION
Evidence
Source path confirmed
Analysis & operational context

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

<h1>22000</h1>

At a glance

22000 is data_exception. The fixed array_append path accepts an empty or one-dimensional array argument and reports the dimensionality requirement otherwise; other Data Exception paths belong to their own subsystem.

Meaning

22000 is data_exception. The fixed array_append path accepts an empty or one-dimensional array argument and reports the dimensionality requirement otherwise; other Data Exception paths belong to their own subsystem.

Messages

The confirmed guard raises ERROR with primary message argument must be empty or one-dimensional array. This fixed path has no separate DETAIL or HINT. The page is source-only; no natural runtime observation is claimed.

Diagnosis

Check the complete message, the array_append call, and the argument type before changing data. The confirmed path rejects an array argument that is neither empty nor one-dimensional.

Response

Correct the array shape or use a function contract that accepts the intended dimensions. This is an ERROR: in an explicit transaction, roll back the whole transaction or roll back to a savepoint established before the call before continuing. Re-run only after validating the argument; do not treat every Data Exception as the same repair. No runtime case was run for this page.

Versions

The locked catalogue records this condition from 7.4 in the listed formal snapshots and 19beta3; fixed source coverage is PostgreSQL 18.6.

Sources

See the fixed source links and scope limits in the structured evidence record.

Source evidence

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

22000 is data_exception in SQLSTATE Class 22.

Method: Read fixed definition.

src.errcodes.18.6

array_append accepts an empty or one-dimensional array; a multi-dimensional argument emits 22000 with the dimensionality message.

Method: Read the complete array_userfuncs.c branch.

Limits: This confirms one core array path, not every Data Exception caller.

src.path.array-append

The locked catalogue records 22000 from 7.4 without proving an exact implementation introduction date.

Method: Use catalogue boundary.

src.errcodes.18.6

Message templates

ERROR · message.array

Primary

argument must be empty or one-dimensional array

Reproduction & repair cases

No reproduction case is attached to this condition.

Recorded runtime evidence

No runtime observation is attached to this entry.

Definition snapshot: english-manuals:98758dd6d6e4b3fff2439d4e929… · English manual source