# 02001 — no_additional_dynamic_result_sets_returned

> PostgreSQL SQLSTATE 02001 names a no-additional-dynamic-result-sets condition; the fixed core scan provides no emitting path.
---

# 02001 — no_additional_dynamic_result_sets_returned

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

`02001` is a no-data-category condition about additional dynamic result sets, not about an ordinary query returning no rows. No resolved 18.6 core/contrib report group was found.

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

| Field | Value |
| --- | --- |
| SQLSTATE | `02001` |
| Condition | `no_additional_dynamic_result_sets_returned` |
| 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_NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED` |
| Aliases | `—` |

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

## Meaning {#meaning}

The definition names exhaustion of additional dynamic result sets, but the fixed source scan does not identify an implementation path.

## Messages and diagnostics {#messages}

No resolved 18.6 message variant was found. Preserve the producing routine/interface, result-set position, client API, and complete diagnostics.

## Diagnosis {#diagnosis}

Locate the dynamic-result-set contract that produced the code and determine whether the caller requested another result set. Do not substitute ordinary row-count checks or PL/pgSQL `NO_DATA_FOUND` handling.

## Response {#response}

Handle the end of the result-set sequence according to the identified interface, or correct the caller's expected count. An unchanged transaction retry does not create another result set.

## Versions {#versions}

`02001` is present from the locked 9.0.23 snapshot through 18.6 and 19 Beta 3, with `known_present_by` 7.4. This is definition evidence only for the fixed 18.6 scan.

## Related {#related}

[`0100C`](../0100c/) concerns dynamic result sets returned; [`P0002`](../p0002/) is PL/pgSQL no-data-found; [`02000`](../02000/) is the general no-data condition.

## Sources {#sources}

- [`errcodes.txt`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L97) — definition, SHA-256 `6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba`.
- [Structured evidence](../data/evidence/02001.json) — fixed sources, message groups, and runtime boundary.
