↑↓ select↵ open⌫ change scopeOpen full search

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

Wiki / SQLSTATE

39004 — null_value_not_allowed

39004 is nullvaluenot_allowed. The fixed definition is present, but the bounded PostgreSQL 18.6 call archive has no resolved report group for this code; diagnose the actual routine or extension boundary before assigning an operation.

English manual coverage begins with PostgreSQL 8.1. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

aliases
Unknown
class name
External Routine Invocation Exception
condition name
null_value_not_allowed
lang
en
sqlstate
39004

Definition PG 18

39004

At a glance {#at-a-glance}

39004 is null_value_not_allowed. The fixed definition is present, but the bounded PostgreSQL 18.6 call archive has no resolved report group for this code; diagnose the actual routine or extension boundary before assigning an operation.

Meaning {#meaning}

It identifies a routine-level NULL contract failure, but the fixed source scan does not identify which routine or wrapper emits it. The condition name alone cannot distinguish an argument, return, trigger, or extension boundary.

Diagnosis {#diagnosis}

Use the full diagnostics to locate the actual routine or extension, then inspect the deployed implementation for this SQLSTATE. The bounded archive is not an absence proof.

Response {#response}

Fix the NULL contract identified by the actual routine or wrapper, then recheck the operation. Without a confirmed emitting path, avoid code-specific transaction or retry claims.

Versions {#versions}

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

Related {#related}

39000, 39P01

Sources {#sources}

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

Compare versions

SQLSTATE evidence and recorded runtime versions

claims · identity
{
  "claim_id": "identity",
  "limits": "",
  "method": "Read the fixed errcodes row and macro.",
  "position": 0,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "39004 is null_value_not_allowed, a SQL Routine Exception condition defined in Class 39."
}
claims · bounded-scan
{
  "claim_id": "bounded-scan",
  "limits": "This is a bounded archive result, not proof that no extension, wrapper, or older/newer source can emit it.",
  "method": "Filter the archive by code and inspect concrete report groups.",
  "position": 1,
  "runtime": [],
  "sources": [
    "src.calls.REL_18_6"
  ],
  "statement": "The fixed REL_18_6 call archive contains no resolved report group for 39004."
}
claims · history
{
  "claim_id": "history",
  "limits": "Definition presence does not identify the operation that rejected the NULL.",
  "method": "Use catalogue presence and history boundaries.",
  "position": 2,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "The locked catalogue records the condition from 7.4 and in the listed release snapshots, without identifying an introducing implementation."
}
sources · src.errcodes.18.6
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/utils/errcodes.txt",
  "position": 0,
  "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
  "source_id": "src.errcodes.18.6",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L310"
}
sources · src.calls.REL_18_6
{
  "commit": "",
  "docs_url": "",
  "kind": "local_artifact",
  "location": "",
  "path": "raw/calls/REL_18_6.jsonl",
  "position": 1,
  "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf",
  "source_id": "src.calls.REL_18_6",
  "tag": "",
  "url": ""
}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · english-manuals:d6accfa9aafff9f213830ea138272be864c007ed84dfb49ade0b11dd6616d24e

Text language: en · english-manuals:d6accfa9aafff9f213830ea138272be864c007ed84dfb49ade0b11dd6616d24e