Postgresql database store procedure insert query and i need print the raise notice the input values
CREATE OR REPLACE FUNCTION new(pk character varying, u character varying,ps character varying)
RETURNS SETOF record AS
$BODY$
BEGIN
RAISE NOTICE 'PK is %','--'pk;
RAISE NOTICE 'Username is %','--'u;
RAISE NOTICE 'Password is %','--'ps;
EXECUTE 'INSERT INTO table_sp("pk_id","username","password")VALUES ('''||pk||''' ,'''||u||''','''||ps||''')' ;
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100
ROWS 1000;
ALTER FUNCTION new(character varying, character varying,character varying)
OWNER TO postgres;
UserManualInputs:
select new('2','admin','admin');
I gave the manual input through select new('2','admin','admin') and i need print in PostgreSQL console input values using raise notice like (RAISE NOTICE 'PK is %','--'pk)