Click here to Skip to main content
15,891,863 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CREATE OR REPLACE FUNCTION mhrorlat_udg.update_the_db(IN para_table_catalog text, IN para_table_schema text,IN para_table_name text, OUT para_id text)
RETURNS text AS
$BODY$
declare
str text;
BEGIN

str:= 'select true FROM information_schema.tables WHERE table_catalog='''|| $1 ||''' and table_schema=''' || $2 ||'''and table_name='''||$3||'''';
EXECUTE (str);


END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE
COST 100;
ALTER FUNCTION mhrorlat_udg.update_the_db(text, text,text) OWNER TO postgres;

select mhrorlat_udg.update_the_db('mhrorlat','mhrorlat_udg','mut_kharedi_old');
drop function mhrorlat_udg.update_the_db(text, text,text);
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900