Re: dynamic sql in PL-Pgsql ?

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: dynamic sql in PL-Pgsql ?
Date: 2008-09-26 20:38:58
Message-ID: 48DD4862.4060603@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 26/09/2008 21:19, Gauthier, Dave wrote:
> As you can see, the select statement needs to be dynamic in that the
> column name is stored in a variable.
>
>
> Can this be done?

http://www.postgresql.org/docs/8.3/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-09-26 21:19:32 Re: Is there any way to reliably influence WHERE predicate evaluation ordering?
Previous Message Gauthier, Dave 2008-09-26 20:19:33 dynamic sql in PL-Pgsql ?