] Call function with dynamic schema name
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
2012/1/15 IlGenna :
> Can you provide me e little example plz?
CREATE SCHEMA s1;
CREATE SCHEMA s2;
CREATE TABLE s1.a1(a int);
CREATE TABLE s2.a1(a int);
CREATE OR REPLACE FUNCTION s1.fx1()
RETURNS int AS $$
BEGIN RETURN (SELECT MAX(a) FROM s1.a1); END
$$ LANGUAGE plpgsql;
CREATE OR REPLACE FU
Can you provide me e little example plz?
Thanks in advance.
Alessio
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Call-function-with-dynamic-schema-name-tp5146721p5146739.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
--
Sent via pgsql-sql m
Hello
2012/1/15 IlGenna :
> 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 thin
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