I have created a function function_1() in Postgres.
Now I want to create another similar function function_2() and copy the content of function_1().
Any Postgres command line can do that?
So far I only used copy&paste method in the command line to create function_2() (need to change the function name to "function_2" after paste)
select pg_get_functiondef ( 'current_database'::regproc ) ;... did a bit editing and then used :create function _db () returns name as $$current_database$$ language internal stable parallel safe strict ;... for example