Re: Function Parameters - Mailing list pgsql-general

From David Fetter
Subject Re: Function Parameters
Date
Msg-id 20050102205652.GD24407@fetter.org
Whole thread Raw
In response to Function Parameters  ("Oluwatope Akinniyi" <topeakinniyi@shepherdhill.biz>)
Responses Re: Function Parameters
List pgsql-general
On Sun, Jan 02, 2005 at 01:31:22AM +0000, Oluwatope Akinniyi wrote:
> Hi,
>
> Compliments of the season.
>
> I tried to create a function with about 60 input parameters and got
> an error message that a function cannot take more than 32
> parameters.

Generally, a function with that many input parameters is a sign of a
bad function design, rather than of an unreasonable limit in
PostgreSQL.

> Is there a way around this?  Or Am I in error?

Um, how do I put this gently...a function with that many parameters
means it's overwhelmingly likely that you are.

Other people have made suggestions about recompiling PostgreSQL,
hacking the source code, etc., etc.  These are things you should only
attempt when you are absolutely certain that there is no other way to
do what you need to do than with a function of 60 parameters.

Here, "absolutely certain" means "having gone over the design of the
entire application, re-doing all of it if needed," because if you go
down the road of having a hand-hacked PostgreSQL, you severely limit
the community's ability to help you when you encounter a problem.

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

pgsql-general by date:

Previous
From: "Joost Kraaijeveld"
Date:
Subject: Re: Select number of children of a parent query
Next
From: "C. Duncan Hudson"
Date:
Subject: Re: Shared Sequences?