Is it possible to write a function (in sql or plpgsql) that allows for an unknown amount of arguments? Something similarto C's printf() function.<br /><br /> ~ chris
On Monday 09 February 2004 14:49, Christian Hergert wrote:
> Is it possible to write a function (in sql or plpgsql) that allows for
> an unknown amount of arguments? Something similar to C's printf()
> function.
>
AFAIK no, but I know of two possible work arounds... first is to write
multiple copies of the function to accept the different number of argument
combinations you need. the other thing i've done in the past is to create
the function as accepting a array as one of its inputs and then handle the
array structure as needed. (bonus points for doing the second method in 7.3
where its much more challenging.) HTH,
Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера