eclipse - How to run a postgressql function -
i struggling execute postgressql function. trying read documentation on side still no use. using toad extension eclipse develop/run function
so far, have written
create or replace function dbname.function_name() returns void $body$ declare x_cur cursor select * dbname.x; x_row record; begin open x_cur; raise notice 'cursor opened'; loop fetch x_cur x_row; exit when not found; end loop; close x_cur; end; $body$ language plpgsql volatile;
i executed script , ran select dbname.function_name(); in sql worksheet , don't see output.
i remember writing functions on plsqldeveloper easy , interactive , struggling postgressql, guys me getting headstart.
thanks
i dont see problem using pgadmin.
the function return void
, raise notice
show message.
i simplify function
create or replace function function_name() returns void $body$ declare begin raise notice 'cursor opened'; end; $body$ language plpgsql volatile;
and execute function
select function_name();
Comments
Post a Comment