Hello to everyone,
I'm trying to use variables in psql script to create some stored funtions.
The problem is that psql variables are not expanded if it is into a dollar
quoted string. This is my example:
\set my_schema foo
CREATE OR REPLACE FUNCTION foo() RETURNS VOID AS
$BODY$
SELECT * FROM :my_schema.my_table;
$BODY$
LANGUAGE sql;
In this manner I receive a syntax error near:
The question is: is there a manner to expand psql script variables inside
dollar quoted string?
Thanks in advance.
Mephysto
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Expanding-psql-variables-tp5447801p5447801.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.