Re: function parameters
От | James Cloos |
---|---|
Тема | Re: function parameters |
Дата | |
Msg-id | m3wt8k8fn2.fsf@lugabout.jhcloos.org обсуждение исходный текст |
Ответ на | Re: function parameters (Richard Broersma Jr <rabroersma@yahoo.com>) |
Список | pgsql-novice |
>>>>> "RB" == Richard Broersma <rabroersma@yahoo.com> writes: JC> Is it possible for funtions to have named parameters rather than JC> just positional parameters? RB> I am not sure that every procedural language is the same, but with plpgsql: RB> www.postgresql.org/docs/8.1/interactive/plpgsql-declarations.html#PLPGSQL-DECLARATION-ALIASES RB> is seems that you can. Thanks for that. I was hoping for something more akin to what perl offers (passing a hash rather than an array). After reading that bit of the docs, I suppose I could have the array take a pair of arrays, one with the names and one with the values. But it seems more likely I'll end up moving that logic out of the sql and into the code generating and submitting the sql. That code is expected to be the only code doing INSERTs, so it should still be sufficiently robust for this project. The reply and this reply have helped me get a better handle on what I want, need and how to do it. -JimC -- James Cloos <cloos@jhcloos.com> OpenPGP: 0xED7DAEA6
В списке pgsql-novice по дате отправления: