java - How to give Function Create/Delete/Alter/Execute permission while createing PostgreSQL user -


i want give function create/delete/alter/execute permission user in postgresql

while creating function i'm getting error

org.postgresql.util.psqlexception: error: must owner of function postgre_proc 

this procedure/function

create or replace function postgre_proc()  returns void $$ begin   insert mapping_table_test values (11, 'prasad', 24); end; $$ language plpgsql; 

the error self explainatory.

to able create or replace function, need owner of function.

using superuser, change ownership of function required user.

alter function name ( [ [ argmode ] [ argname ] argtype [, ...] ] ) owner new_owner 

refer - this


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -