Re: Function Parameters

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Function Parameters
Дата
Msg-id 20050102205652.GD24407@fetter.org
обсуждение исходный текст
Ответ на Function Parameters  ("Oluwatope Akinniyi" <topeakinniyi@shepherdhill.biz>)
Ответы Re: Function Parameters  (Michael Fuhr <mike@fuhr.org>)
Список 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 по дате отправления:

Предыдущее
От: "Joost Kraaijeveld"
Дата:
Сообщение: Re: Select number of children of a parent query
Следующее
От: "C. Duncan Hudson"
Дата:
Сообщение: Re: Shared Sequences?