Re: Proposal: OUT parameters for plpgsql
От | Jim C. Nasby |
---|---|
Тема | Re: Proposal: OUT parameters for plpgsql |
Дата | |
Msg-id | 20050321213006.GR51784@decibel.org обсуждение исходный текст |
Ответ на | Proposal: OUT parameters for plpgsql (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Mon, Mar 21, 2005 at 02:25:47PM -0500, Tom Lane wrote: > A possible future extension is to add some sort of direct procedure call > syntax in plpgsql. Right now, you'd need to write something like > select into x,y,z from foo(a,b,c); > to call a function with IN parameters a,b,c and get back OUT parameters > x,y,z. It would obviously be nicer to write > foo(a,b,c,x,y,z); > However, I'm inclined to wait on this until someone does > parameter-matching-by-name, for fear of creating problems for that > feature. (If people think this couldn't interfere, maybe I'll go ahead > and do it.) I'm not planning to invent new calling syntax at the SQL > level, either, since that's probably best reserved for procedures-outside- > transactions. ISTM that we'd want to support calling by position as well as calling by parameter name, which means there will need to be a different calling convention for the two modes. foo(a, b, c) is the only logical way to call by position, and I don't see how it could interfer with calling by name, which would need to be something like foo(param_a=>a, param_b=>b, param_c=>c). In the meantime, I think being able to call foo(a, b, c) is much nicer than SELECT INTO b, c foo(a, b). Not only is it more compact and readable, it will make porting to plpgsql easier. -- Jim C. Nasby, Database Consultant decibel@decibel.org Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"
В списке pgsql-hackers по дате отправления: