select open change scope Open full search

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

SQLSTATE / CLASS 38 · EXTERNAL ROUTINE EXCEPTION

modifying_sql_data_not_permitted

SQLSTATE
38002
Condition name
modifying_sql_data_not_permitted
Class
External Routine Exception
Source macro
ERRCODE_E_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED
Evidence
Definition only
Analysis & operational context

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

<h1>38002</h1>

At a glance

This Class 38 member names a modifying-data restriction. The fixed PostgreSQL 18.6 core/contrib scan found no resolved report group for it, so it must not be conflated with the separately named 2F002 member.

Meaning

The distinction is the SQLSTATE and the routine standard class, not a guessed PostgreSQL function-volatility rule. Preserve whether the routine was external, remote, or client-owned.

Messages

No fixed PostgreSQL message variant was adopted because the bounded scan did not resolve a native report group.

Diagnosis

Inspect the routine declaration and the implementation that enforced it; determine whether the attempted operation modified SQL data and which boundary supplied the error.

Response

Change the declared data-access contract only when its owner documents that repair, or move the write to an allowed boundary. Do not infer a generic retry.

Versions

The locked catalogue places this condition at least by PostgreSQL 7.4. The facts block lists the published snapshots; source-path status is limited to the fixed PostgreSQL 18.6 evidence below.

Sources

See the fixed source links and message 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.

38002 is modifying_sql_data_not_permitted in SQLSTATE Class 38.

Method: Read the fixed errcodes definition row, severity, and macro.

src.errcodes.18.6

No resolved 38002 report group was found in the locked PostgreSQL 18.6 core/contrib call scan.

Method: Compare resolved report groups with the fixed macro mapping.

Limits: The scan does not cover external wrappers, drivers, extensions, remote systems, or user code; absence from this scan is not absolute.

src.calls.REL_18_6 src.errcodes.18.6

Locked release definitions establish catalogue presence from 7.4; they do not establish a precise introducing release or runtime use.

Method: Compare canonical release facts with the available history boundary.

Limits: Definition presence is not an emitting-path observation.

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.

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