PG and dynamic statements in stored procedures/triggers? - Mailing list pgsql-general

From Durumdara
Subject PG and dynamic statements in stored procedures/triggers?
Date
Msg-id AANLkTimNsaGkyd6YEJNWwZEXa2M_Jng37hqoc7Q+4hKA@mail.gmail.com
Whole thread Raw
Responses Re: PG and dynamic statements in stored procedures/triggers?  (Vibhor Kumar <vibhor.kumar@enterprisedb.com>)
Re: PG and dynamic statements in stored procedures/triggers?  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
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

pgsql-general by date:

Previous
From: "chris r."
Date:
Subject: Re: pg_dump slow with bytea data
Next
From: Vibhor Kumar
Date:
Subject: Re: PG and dynamic statements in stored procedures/triggers?