On Fri, 3 Oct 2003, Yolanda Phillips wrote:
> Good day,
>
> I need help URGENTLY!!
>
> I'm trying to compile a Stored Function that performs either an insert or an
> update on a table. The function has 44 input parameters and returns an
> integer. When compiling the function a get an error:
>
> ERROR: functions cannot have more than 32 arguments
>
> I would just like someone to confirm this. Can a function only have 32 input
> parameters? If so, I'd have to use Prepared Statements then.
The 32 arg limit is a compile time / reinitdb parameter. I.e. you can
change it, but you'll have to first pg_dumpall your database, recompile
postgresql with a different limit, and then restore your database to get
more than 32 args.
But there are other ways around it, like passing a record type or array to
the function.