Hi,
please advise is possible in SELECT query use variable as a table name?

I would like to have  for example something like:

CREATE OR REPLACE FUNCTION test_name (tb varchar) RETURNS int AS  $$

DECLARE 

                 ......

BEGIN
                SELECT * FROM $1;
                ........

Will be grateful for any idea about.

 

Best regards
            Andrey  

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

Reply via email to