postgresql_16:7.1.22.3 Examples
PostgreSQL 16 > Reference > SQL Commands > ALTER PROCEDURE > Examples
To rename the procedure insert_data with two arguments of type integer to insert_record: ALTER PROCEDURE insert_data(integer, integer) RENAME TO insert_record;
To change the owner of the procedure insert_data with two arguments of type integer to joe: ALTER PROCEDURE insert_data(integer, integer) OWNER TO joe;
To change the schema of the procedure insert_data with two arguments of type integer to accounting: ALTER PROCEDURE insert_data(integer, integer) SET SCHEMA accounting;
To mark the procedure insert_data(integer, integer) as being dependent on the extension myext: ALTER PROCEDURE insert_data(integer, integer) DEPENDS ON EXTENSION myext;
To adjust the search path that is automatically set for a procedure: ALTER PROCEDURE check_password(text) SET search_path = admin, pg_temp;
To disable automatic setting of search_path for a procedure: ALTER PROCEDURE check_password(text) RESET search_path; The procedure will now execute with whatever search path is used by its caller.