On 5/31/2012 12:49 PM, Josh Kupershmidt wrote:
> On Thu, May 31, 2012 at 12:25 PM, Ross Boylan<ross@biostat.ucsf.edu> wrote:
>> Thanks for the info. I am on 8.4.
>> I didn't realize plpgsql let you convert variables (i.e., results of a
>> select to get table names) into command text.
> Yup, you just have to remember to use the EXECUTE command in your
> PL/pgSQL function when you are constructing dynamic SQL. Here's an
> example relevant to your scenario:
> http://archives.postgresql.org/pgsql-general/2010-01/msg00871.php
>
> Josh
I thought the tip was worth preserving for the list, along with my
thanks, so I'm sending it to the list. I hadn't been thinking of
execute; I've got too much SAS macros on the brain.
Ross