Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
ALTER ROUTINE
Prev UpSQL CommandsHome Next

ALTER ROUTINE

ALTER ROUTINE — change the definition of a routine

Synopsis

ALTER ROUTINEname [ ( [ [argmode ] [argname ]argtype [, ...] ] ) ]action [ ... ] [ RESTRICT ]ALTER ROUTINEname [ ( [ [argmode ] [argname ]argtype [, ...] ] ) ]    RENAME TOnew_nameALTER ROUTINEname [ ( [ [argmode ] [argname ]argtype [, ...] ] ) ]    OWNER TO {new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }ALTER ROUTINEname [ ( [ [argmode ] [argname ]argtype [, ...] ] ) ]    SET SCHEMAnew_schemaALTER ROUTINEname [ ( [ [argmode ] [argname ]argtype [, ...] ] ) ]    [ NO ] DEPENDS ON EXTENSIONextension_namewhereaction 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

Description

ALTER ROUTINE changes the definition of a routine, which can be an aggregate function, a normal function, or a procedure. See underALTER AGGREGATE,ALTER FUNCTION, andALTER PROCEDURE for the description of the parameters, more examples, and further details.

Examples

To rename the routinefoo for typeinteger tofoobar:

ALTER ROUTINE foo(integer) RENAME TO foobar;

This command will work independent of whetherfoo is an aggregate, function, or procedure.

Compatibility

This statement is partially compatible with theALTER ROUTINE statement in the SQL standard. See underALTER FUNCTION andALTER PROCEDURE for more details. Allowing routine names to refer to aggregate functions is aPostgres Pro extension.

See Also

ALTER AGGREGATE,ALTER FUNCTION,ALTER PROCEDURE,DROP ROUTINE

Note that there is noCREATE ROUTINE command.


Prev Up Next
ALTER ROLE Home ALTER RULE
pdfepub
Go to Postgres Pro Standard 17
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp