# 2F004 — reading_sql_data_not_permitted

> Source-backed reference for PostgreSQL SQLSTATE 2F004.
---

# 2F004

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

The catalogue defines this standard member, but the resolved PostgreSQL 18.6 core/contrib scan found no native report group. Do not infer a PostgreSQL function volatility or language rule from the condition name.

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

| Field | Value |
| --- | --- |
| SQLSTATE | `2F004` |
| Condition | `reading_sql_data_not_permitted` |
| 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_S_R_E_READING_SQL_DATA_NOT_PERMITTED` |
| Aliases | `—` |

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

## Meaning {#meaning}

2F004 describes a routine data-access restriction only when the producing implementation enforces it. A client, extension, ECPG layer, or remote routine engine may use the member independently.

## Messages {#messages}

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

## Diagnosis {#diagnosis}

Record the routine owner, invocation phase, actual SQLSTATE, and declaration that limited reads. If the backend returned a different code, follow that code and its source path; the fixed catalogue row is not a fallback diagnosis.

## Response {#response}

Apply only the producing implementation’s documented declaration or caller repair. No native PostgreSQL reporting path or generic retry boundary was confirmed for 2F004.

## 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}

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

## Sources {#sources}

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