Thread: Execute dynamically generated query???

Execute dynamically generated query???

From
"Unnikrishnan Menon"
Date:
Hi,
 
I am new to PostgreSQL and wish to do the following:
 
1. I am trying to execute a dynamically generated query within a function - Create table tablename as Select expressions .. from tablename, tablename where ......    
    The function on execution gives the following error: Select ....into is not yet implemented. Could anyone help me with a workaround for the function to be executed.
 
2. Select count(*) count from tab;
    The following query gives the error Relation tab does not exists. Through documents i understand that it is not possible to use the above query. Has anybody tried a
    workaround process for the above.
 
Any help would be welcome,
 
Thanx in advance,
 
Unnikrishnan Menon.