Re: variable-count stored proc arguements?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: variable-count stored proc arguements?
Дата
Msg-id 1067.1048980726@sss.pgh.pa.us
обсуждение исходный текст
Ответ на variable-count stored proc arguements?  (Ben <bench@silentmedia.com>)
Ответы Re: variable-count stored proc arguements?  (Ben <bench@silentmedia.com>)
Список pgsql-general
Ben <bench@silentmedia.com> writes:
> Is there such a thing?

No.  If you are working in C, it's possible to make multiple pg_proc
entries pointing to the same C function, but this is a tedious way to
do things; and it doesn't scale to large numbers of arguments.

> My guess is there isn't, but I'm trying to figure
> out how to encapsulate some "select where foo=a [and foo=b [and foo=c
> [...]]]" logic into a stored proc, and that would be an elegant way to
> do it.

Perhaps pass the a,b,c values as an array?

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 7.3.2 Regression Failures Worth Looking Into
Следующее
От: Ben
Дата:
Сообщение: Re: variable-count stored proc arguements?