Independent technical referenceOfficial site
  • Software and systems
  • Database

22003

PostgreSQL 22003: numeric_value_out_of_range

Verified with sources2 sourcesReviewed Aug 23, 2026
Trace

Risk level

Medium

Proceed carefully and stop if the check is unclear.

Urgency

Medium

Quick answer

SQLSTATE 22003 (numeric_value_out_of_range) means a numeric value or intermediate result exceeds the range of its PostgreSQL type. Diagnose the named condition before retrying.

Safety first

Safe checks you can perform

  • Find the overflowing expression and type

What a technician must be able to justify

A technician is coming

These are the steps they must carry out and show you. Tick them as they work: if steps are skipped, do not accept a part swap.

These are not instructions for opening or handling the equipment yourself. They are the checks that should support a technical conclusion.

    Before accepting a part or repair

    Nothing has been shown yet. Do not accept a part swap based on the code alone.

    Follow these steps

    Note: Follow the documented order. An error code identifies the affected system, but it does not prove by itself which part has failed.

    1. Find the overflowing expression and type

      Tools required

      Use the statement position and schema to identify the cast, column or intermediate expression, then compare the actual value with that type's range and numeric precision. Correct the calculation or validation; widen the type only after checking indexes, APIs and downstream consumers.

      Evidence: PostgreSQL 18 Appendix A: Error Codes · PostgreSQL error and notice fields

    Still not solved

    If the error persists, stop here. See what the technician must do and show you.

    Virtual technician

    Does 22003 still appear after these checks?

    This guided flow uses the exact code and your answers to choose a test, an expected result and the next branch.

    Where this code applies

    A code is meaningful only inside the right product and version context.

    Primary scope

    System
    Software and systems
    Brand
    PostgreSQL
    Product type
    Database

    Known code variants

    • numeric_value_out_of_range
    • PostgreSQL 22003
    • SQLSTATE 22003

    What it means

    PostgreSQL assigns 22003 to numeric_value_out_of_range in Class 22 — Data Exception. Applications should branch on the stable SQLSTATE and structured error fields, not localized message text.

    Symptoms and causes

    Probable causes · in order

    • Likely trigger in this requestCommon

      A cast, arithmetic operation, sequence value or write produced a number outside the destination precision or integer bounds.

      Evidence: PostgreSQL 18 Appendix A: Error Codes · PostgreSQL error and notice fields

    Sources and technical references

    1. 1

      PostgreSQL 18 Appendix A: Error Codes

      PostgreSQL Global Development Group · 2026 · official_doc

    2. 2

      PostgreSQL error and notice fields

      PostgreSQL Global Development Group · 2026 · official_doc

    Sources: PostgreSQL 18 Appendix A: Error Codes · PostgreSQL error and notice fieldsreviewed 2026-08-23 · verified

    Was this entry useful?