Call function with dynamic schema name - Mailing list pgsql-sql

From IlGenna
Subject Call function with dynamic schema name
Date
Msg-id 1326648533548-5146721.post@n5.nabble.com
Whole thread Raw
Responses Re: Call function with dynamic schema name  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-sql
Hi to everyone,
I would like to use in my function (plpgsql or sql) dynamic schema name to
execute query or to call other functions.

For exemple in oracle is possible to excute query in this manner:


SELECT * FROM &&SCHEMA_NAME..TABLE_NAME;

Where I think &&SCHEMA_NAME. is a sessione variable.

I found tath I can use dynamic SQL like this:

execute 'select * from ' || schema_name || '.table_name';


However, I would like to know if exist any other system to use dynamic
schema name more similiar to Oracle. Another pl language is also ok.


Thank you very much.


Alessio

--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Call-function-with-dynamic-schema-name-tp5146721p5146721.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Token separation
Next
From: Pavel Stehule
Date:
Subject: Re: Call function with dynamic schema name