Search Postgresql Archives

Re: PG and dynamic statements in stored procedures/triggers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday, March 07, 2011 6:32:44 am Durumdara wrote:
> Hi!
> 
> In other RDBMS I found a way to make dynamic statements.
> I can use variables, or concat the SQL segments, and execute it all.
> 
> :tablename = call CreateTempTable;
> 
> insert into :tablename ....
> drop table :tablename
> 
> or (FireBird like cursor handling):
> 
> sql = "select * from " || :tablename || " where..."
> for select :sql ....
> ...
> 
> Can I do same thing in PGSQL too?
> 
> Thanks:
>    dd

http://www.postgresql.org/docs/9.0/interactive/plpgsql-statements.html#PLPGSQL-
STATEMENTS-EXECUTING-DYN
-- 
Adrian Klaver
adrian.klaver@xxxxxxxxx

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux