i got it here i done it with 'quote_ident ' instead of 'quote_literal'
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/passing-schema-name-and-table-name-as-parameter-functions-in-postgresql-9-2-tp5758130p5758260.html
Sent from the PostgreSQL - general mailing list arc
hi my requirement is to create a table as a result of sub-query and the table
and schema name should be passed as parameters of a function
i also tried like this;
CREATE OR REPLACE FUNCTION secc_master.chkschema(schemaname text, tableis
text)
RETURNS void AS
$BODY$
DECLARE
ione boolean;
thanks 'quote_literal' worked :)
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/checking-schema-present-or-not-by-passing-schema-name-as-parameter-tp5758131p5758251.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
--
Sent via pgsql-genera
i am checking if schema present or not and passing schema name dynamically
but it's trowing an error :
CREATE OR REPLACE FUNCTION chkschema(schemaname text)
RETURNS boolean AS
$BODY$
DECLARE
i boolean;
BEGIN
EXECUTE 'SELECT exists(select schema_name FROM
information_schema.schemat
I am trying to build a function which check for the schema and table in
database if present then select the table values else create that schema and
table and passing schema and table name as parameters of a function.
CREATE OR REPLACE FUNCTION master.chkbypram(schemaname text,state
text,wallma