[GENERAL] Re: passing schema name and table name as parameter functions in postgresql 9.2

2013-06-07 Thread anushasrivastava03
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

[GENERAL] Re: passing schema name and table name as parameter functions in postgresql 9.2

2013-06-06 Thread anushasrivastava03
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;

[GENERAL] Re: checking schema present or not by passing schema name as parameter

2013-06-06 Thread anushasrivastava03
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

[GENERAL] checking schema present or not by passing schema name as parameter

2013-06-06 Thread anushasrivastava03
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

[GENERAL] passing schema name and table name as parameter functions in postgresql 9.2

2013-06-06 Thread anushasrivastava03
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