PG
PRO
0100CWARNINGTier 3 — Handle with care✅ HIGH confidence

dynamic result sets returned

Category: WarningVersions: All Postgres versions

What this means

SQLSTATE 0100C is raised when a SQL routine (e.g., a stored procedure) returns more result sets than the caller expected or declared. It is informational and does not abort the statement.

Why it happens

  1. 1A procedure returns multiple cursors or result sets and the caller only declared capacity for fewer

How to reproduce

SQL/PSM procedure returning dynamic result sets.

trigger — this will ERROR
WARNING: dynamic result sets returned

Fix 1: Declare the correct number of result sets in the caller

When the warning appears in application logs from stored procedure calls.

fix

Why this works

Ensure the calling context (e.g., JDBC, libpq) processes all returned result sets from a procedure.

Sources

📚 Official docs: https://www.postgresql.org/docs/current/errcodes-appendix.html

🔧 Source ref: Class 01 — Warning

Confidence assessment

✅ HIGH confidence

Defined in SQL standard and in Postgres SQLSTATE appendix. Rarely encountered in practice.

See also

🔗 Related errors

📄 Reference pages

CREATE PROCEDURE
⚙️ This error reference was generated with AI assistance and reviewed for accuracy. Examples are provided to illustrate common scenarios and may not cover every case. Always test fixes in a development environment before applying to production. Spotted an error? Suggest a correction →