SQLSTATE 54023 ERROR Class 54: Program Limit Exceeded

too_many_arguments procedures cannot have more than n argument — 54023

PostgreSQL error “procedures cannot have more than n argument” (SQLSTATE 54023, too_many_arguments): what it means, common causes, and how to fix it.

PG 15, 16, 17, 18, 19 Official docs
Last reviewed May 2026 Grounded in source
Production impact Low Competency Transactions & Isolation Career Pass Senior DBA interviews Frequency Rare

Investigation

Symptoms

A statement failed with SQLSTATE 54023 (too_many_arguments), reported at severity ERROR. This is a Program Limit Exceeded condition: PostgreSQL emits the message procedures cannot have more than n argument.

  • The client receives SQLSTATE 54023 (too many arguments).
  • The operation is rejected at ERROR level; the statement does not complete.

What the server log shows

ERROR:  procedures cannot have more than n argument

Why PostgreSQL raises this

Class 54 (Program Limit Exceeded) is raised when a hard implementation limit is hit — too many columns, arguments, an over-long identifier, or a row/expression that is too large.

As described in PostgreSQL’s Appendix K PostgreSQL Limits and Appendix A (PostgreSQL Error Codes), SQLSTATE 54023 carries the condition name too_many_arguments in class Program Limit Exceeded. (Paraphrased — see the linked reference for the exact wording.)

Common causes

  • A statement exceeded a structural limit (columns, arguments, nesting).
  • An identifier or value exceeded its maximum size.
  • A row or index entry was too large to store.

How to fix it

  1. Simplify or split the statement/schema to stay within limits.
  2. Shorten identifiers or reduce the number of columns/arguments.
  3. Restructure the data so individual values fit the limit.

Version applicability

This message is present in PostgreSQL 15, 16, 17, 18 and 19.

Related & next steps

Reference: PostgreSQL Appendix K PostgreSQL Limits.

Keep going

Related & next steps

Concepts on this page

Was this helpful?