4 ALTER ROUTINE — change the definition of a routine
8 ALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]
9 action [ ... ] [ RESTRICT ]
10 ALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]
12 ALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]
13 OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
14 ALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]
16 ALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]
17 [ NO ] DEPENDS ON EXTENSION extension_name
19 where action is one of:
21 IMMUTABLE | STABLE | VOLATILE
23 [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER
24 PARALLEL { UNSAFE | RESTRICTED | SAFE }
27 SET configuration_parameter { TO | = } { value | DEFAULT }
28 SET configuration_parameter FROM CURRENT
29 RESET configuration_parameter
34 ALTER ROUTINE changes the definition of a routine, which can be an
35 aggregate function, a normal function, or a procedure. See under ALTER
36 AGGREGATE, ALTER FUNCTION, and ALTER PROCEDURE for the description of
37 the parameters, more examples, and further details.
41 To rename the routine foo for type integer to foobar:
42 ALTER ROUTINE foo(integer) RENAME TO foobar;
44 This command will work independent of whether foo is an aggregate,
45 function, or procedure.
49 This statement is partially compatible with the ALTER ROUTINE statement
50 in the SQL standard. See under ALTER FUNCTION and ALTER PROCEDURE for
51 more details. Allowing routine names to refer to aggregate functions is
52 a PostgreSQL extension.
56 ALTER AGGREGATE, ALTER FUNCTION, ALTER PROCEDURE, DROP ROUTINE
58 Note that there is no CREATE ROUTINE command.