22000
PostgreSQLERRORNotableData ExceptionHIGH confidence

data exception

What this means

SQLSTATE 22000 is the generic data exception code. It is raised when an error related to data values occurs that does not map to a more specific 22xxx subcode. Check the error detail message for the actual cause.

Why it happens
  1. 1Data value is invalid for the operation or target type, without a more specific 22xxx code applying
How to reproduce

Generic data validation failure.

expected output

ERROR:  data exception

Fix

Inspect the error DETAIL and HINT for the specific data issue

WHEN When 22000 appears in application logs.

Why this works

Postgres always includes a detail message with 22000. Read it to find the actual problematic value and column, then apply data cleaning or schema correction.

Sources
Official documentation ↗

Class 22 — Data Exception

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All PostgreSQL errors