Re: dynamic field names in a function.
От | will trillich |
---|---|
Тема | Re: dynamic field names in a function. |
Дата | |
Msg-id | 20010331000508.P31280@mail.serensoft.com обсуждение исходный текст |
Ответ на | Re: dynamic field names in a function. (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: dynamic field names in a function.
|
Список | pgsql-general |
On Sat, Mar 31, 2001 at 12:42:29AM -0500, Tom Lane wrote: > Soma Interesting <dfunct@telus.net> writes: > > In the following, is there something I can do so that postgres will > > evaluate NEW.qty to NEW.name, treating qty as a variable and evaluating it > > before evaluating the field reference? > > Plain PLSQL will not do this --- it wants to know field names when the > query is first compiled. (This is a feature, not a bug, since it > implies that the query can be optimized during compilation.) > > You could use PLTCL or PLPERL instead. Both of them treat queries > as plain strings that you assemble out of whatever parts you please > and then pass to the query engine. Of course you pay the cost of > re-planning the query from scratch every time --- there's no free lunch. <ding ding ding> there's that magic word PLPERL again... ! HOW do you find out if your postgresql (mine's 7.0.3) can support the plperl.so feature? And HOW do you go about installing it, if it does? What parts are necessary? -- does a brain cell think? will@serensoft.com http://sourceforge.net/projects/newbiedoc -- we need your brain! http://www.dontUthink.com/ -- your brain needs us!
В списке pgsql-general по дате отправления: