This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the
currentversion, or one of the other supported versions listed above instead.
ALTER ROUTINEALTER ROUTINE — change the definition of a routine
SynopsisALTER ROUTINEDescriptionname
[ ( [ [argmode
] [argname
]argtype
[, ...] ] ) ]action
[ ... ] [ RESTRICT ] ALTER ROUTINEname
[ ( [ [argmode
] [argname
]argtype
[, ...] ] ) ] RENAME TOnew_name
ALTER ROUTINEname
[ ( [ [argmode
] [argname
]argtype
[, ...] ] ) ] OWNER TO {new_owner
| CURRENT_ROLE | CURRENT_USER | SESSION_USER } ALTER ROUTINEname
[ ( [ [argmode
] [argname
]argtype
[, ...] ] ) ] SET SCHEMAnew_schema
ALTER ROUTINEname
[ ( [ [argmode
] [argname
]argtype
[, ...] ] ) ] [ NO ] DEPENDS ON EXTENSIONextension_name
whereaction
is one of: IMMUTABLE | STABLE | VOLATILE [ NOT ] LEAKPROOF [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER PARALLEL { UNSAFE | RESTRICTED | SAFE } COSTexecution_cost
ROWSresult_rows
SETconfiguration_parameter
{ TO | = } {value
| DEFAULT } SETconfiguration_parameter
FROM CURRENT RESETconfiguration_parameter
RESET ALL
ALTER ROUTINE
changes the definition of a routine, which can be an aggregate function, a normal function, or a procedure. See under ALTER AGGREGATE, ALTER FUNCTION, and ALTER PROCEDURE for the description of the parameters, more examples, and further details.
To rename the routine foo
for type integer
to foobar
:
ALTER ROUTINE foo(integer) RENAME TO foobar;
This command will work independent of whether foo
is an aggregate, function, or procedure.
This statement is partially compatible with the ALTER ROUTINE
statement in the SQL standard. See under ALTER FUNCTION and ALTER PROCEDURE for more details. Allowing routine names to refer to aggregate functions is a PostgreSQL extension.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4