Re: dynamic field names in a function.

From: Soma Interesting <dfunct(at)telus(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: dynamic field names in a function.
Date: 2001-04-03 20:23:37
Message-ID: 5.0.2.1.0.20010403132058.02250420@pop.telus.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 12:42 AM 3/31/2001 -0500, you wrote:
>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.
>
>In 7.1, PLSQL can do that trick too, via its new EXECUTE statement.

You neglected to mention that triggers can't call perl functions. Had you
mentioned this - I'd not have bothered spending several days trying to get
perl working with postgres.

YOU SHOULD EXPLICITLY SAY THIS IN YOUR MANUAL!!!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-04-03 20:37:20 Re: Installing plperl
Previous Message Sean Harding 2001-04-03 20:02:10 Re: dev version changes/release history