Re: permissions/building commands from variables - Mailing list pgsql-novice

From Ross Boylan
Subject Re: permissions/building commands from variables
Date
Msg-id 4FC7D664.8090808@biostat.ucsf.edu
Whole thread Raw
In response to permissions  (Ross Boylan <ross@biostat.ucsf.edu>)
List pgsql-novice
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


pgsql-novice by date:

Previous
From: Josh Kupershmidt
Date:
Subject: Re: permissions
Next
From: bradawk
Date:
Subject: database in different location owned by different user