# 38003 — prohibited_sql_statement_attempted

> Source-backed reference for PostgreSQL SQLSTATE 38003.
---

# 38003

## At a glance {#at-a-glance}

The Class 38 member is defined, but no resolved PostgreSQL 18.6 core/contrib report group was found. It is distinct from Class 2F member 2F003 even though the condition names match.

<!-- BEGIN SQLSTATE FACTS: generated by scripts/generate.py; do not edit -->

| Field | Value |
| --- | --- |
| SQLSTATE | `38003` |
| Condition | `prohibited_sql_statement_attempted` |
| Status | `active` |
| Known present by | `7.4` |
| Locked snapshots | `9.0.23, 9.1.24, 9.2.24, 9.3.25, 9.4.26, 9.5.25, 9.6.24, 10.23, 11.22, 12.22, 13.23, 14.24, 15.19, 16.15, 17.11, 18.6, 19beta3` |
| Macros | `ERRCODE_E_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED` |
| Aliases | `—` |

<!-- source facts: data/errcodes/38003.json -->
<!-- END SQLSTATE FACTS -->

## Meaning {#meaning}

The external-routine class identifies the standard context; the actual prohibited statement, routine language, and owner remain unknown until a source path or message is found.

## Messages {#messages}

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

## Diagnosis {#diagnosis}

Preserve the returned class/member code and inspect the external routine contract. Do not import dblink or postgres_fdw 2F003 messages into 38003.

## Response {#response}

Repair the owner’s routine or call contract according to its fixed documentation; no PostgreSQL-native repair was confirmed.

## Versions {#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.

## Related {#related}

[`38000`](../38000/), [`2F000`](../2f000/)

## Sources {#sources}

See the fixed source links and message limits in the structured [evidence record](../data/evidence/38003.json).
