Pivotal Knowledge Base

Follow

Function fails with "ERROR: functions cannot have more than 100 arguments"

Problem

The stored procedures/Functions are limited to 100 parameters and server parameter max_function_args control this and is read only which also means that it cannot be modified.

If you try to use more than 100 arguments in the function , then you would be encountering the error message

ERROR: functions cannot have more than 100 arguments

Cause

This is a know limitation and its very difficult to change since the limitation is baked very deeply into the existing catalog structure.

Solution

Some options/workarounds available to overcome this is:

  • Use arrays rather than individual arguments
  • Use record data-types to the functions rather than individual arguments

Comments

Powered by Zendesk