Thread: Is there a way to pass more than 32 parameters to a plpgsql function?

Is there a way to pass more than 32 parameters to a plpgsql function?

From
"Jon Brazus"
Date:
Does anyone know of a way to pass more than 32 parameters to a plpgsql function?  The 7.3 release documentation states
thatfuctions can now take up to 32 parameters "by default", which implies that perhaps this can be changed with a
tuningparameter or some such.  Or failing that, does anyone know if this limit is going to be increased again in the
7.4release?  Any help is appreciated. 

Thanks,

Jon

Re: Is there a way to pass more than 32 parameters to a

From
Joe Conway
Date:
Jon Brazus wrote:
> Does anyone know of a way to pass more than 32 parameters to a
> plpgsql function?  The 7.3 release documentation states that fuctions
> can now take up to 32 parameters "by default", which implies that
> perhaps this can be changed with a tuning parameter or some such.  Or
> failing that, does anyone know if this limit is going to be increased
> again in the 7.4 release?  Any help is appreciated.

You have to edit a #define and compile from source. Grep for FUNC_MAX_ARGS.

There are performance and database size implications. Search the mail
archives for some test results I posted last August as we were preparing
for the 7.3 release.

You could also combine arguments of like types into arrays if there are
sensible groupings, but that may be harder than it sounds in 7.3 :(. In
the upcoming 7.4 release FUNC_MAX_ARGS will likely remain at 32, but
grouping arguments using arrays is much easier.

HTH,

Joe



Re: Is there a way to pass more than 32 parameters to a

From
"scott.marlowe"
Date:
On Wed, 16 Jul 2003, Jon Brazus wrote:

>
> Does anyone know of a way to pass more than 32 parameters to a plpgsql
> function?  The 7.3 release documentation states that fuctions can now
> take up to 32 parameters "by default", which implies that perhaps this
> can be changed with a tuning parameter or some such.  Or failing that,
> does anyone know if this limit is going to be increased again in the 7.4
> release?  Any help is appreciated.

sure, you need to edit

pg_config.h.in and change the #define FUNC_MAX_ARGS line to whatever you
want. Then run .configure --yourswtichesgohere and make install.

Note that this requires a dump / restore, if I remember correctly.