{"Entry":{"collection":"sql","key":"alter-routine","name":"ALTER ROUTINE","aliases":["alterroutine"],"metadata":{"aliases":["alterroutine"],"changed_in":["13","14"],"changes":[{"from":"10","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"added","synopsis":null,"to":"11"},{"from":"12","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"changed","synopsis":{"added":["[ NO ] DEPENDS ON EXTENSION extension_name"],"removed":[]},"to":"13"},{"from":"13","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"changed","synopsis":{"added":["OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }"],"removed":[]},"to":"14"}],"content_hash":"fd60b851ae03fad4cac48c89fdacf03c5958136eb677e0a411487ae8c7ee022f","editorial":{},"first_version":"11","group":"routine","imported_at":"2026-09-30T17:43:37.311777+08:00","last_version":"20","name":"ALTER ROUTINE","object":"ROUTINE","position":2014,"present_in":["11","12","13","14","15","16","17","18","19","20"],"purpose":"change the definition of a routine","purpose_zh":"","related":["alter-aggregate","alter-function","alter-procedure","drop-routine"],"slug":"alter-routine","source_rev":"a709ab85","synopsis":"ALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\naction [ ... ] [ RESTRICT ]\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\nRENAME TO new_name\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\nOWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\nSET SCHEMA new_schema\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\n[ NO ] DEPENDS ON EXTENSION extension_name\nwhere action is one of:\n\nIMMUTABLE | STABLE | VOLATILE\n[ NOT ] LEAKPROOF\n[ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER\nPARALLEL { UNSAFE | RESTRICTED | SAFE }\nCOST execution_cost\nROWS result_rows\nSET configuration_parameter { TO | = } { value | DEFAULT }\nSET configuration_parameter FROM CURRENT\nRESET configuration_parameter\nRESET ALL","verb":"ALTER"}},"Definition":{"Collection":"sql","Key":"alter-routine","SourceDatabase":"center","Version":"18","SourceTable":"sqlcmd","SourceKey":"alter-routine","SourceRevision":"a709ab85","Facts":{"anchor":"SQL-ALTERROUTINE","file":"sql-alterroutine.html","lang":"en","name":"ALTER ROUTINE","purpose":"change the definition of a routine","purpose_zh":"","related":["alter-aggregate","alter-function","alter-procedure","drop-routine"],"sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eALTER ROUTINE\u003c/code\u003e changes the definition of a routine, which can be an aggregate function, a normal function, or a procedure. See under \u003ca href=\"/docs/18/sql-alteraggregate.html\" title=\"ALTER AGGREGATE\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER AGGREGATE\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/docs/18/sql-alterfunction.html\" title=\"ALTER FUNCTION\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER FUNCTION\u003c/span\u003e\u003c/a\u003e, and \u003ca href=\"/docs/18/sql-alterprocedure.html\" title=\"ALTER PROCEDURE\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER PROCEDURE\u003c/span\u003e\u003c/a\u003e for the description of the parameters, more examples, and further details.\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cp\u003eTo rename the routine \u003ccode class=\"literal\"\u003efoo\u003c/code\u003e for type \u003ccode class=\"type\"\u003einteger\u003c/code\u003e to \u003ccode class=\"literal\"\u003efoobar\u003c/code\u003e:\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER ROUTINE foo(integer) RENAME TO foobar;\n\u003c/pre\u003e\u003cp\u003eThis command will work independent of whether \u003ccode class=\"literal\"\u003efoo\u003c/code\u003e is an aggregate, function, or procedure.\u003c/p\u003e","key":"examples","title":"Examples"},{"html":"\u003cp\u003eThis statement is partially compatible with the \u003ccode class=\"command\"\u003eALTER ROUTINE\u003c/code\u003e statement in the SQL standard. See under \u003ca href=\"/docs/18/sql-alterfunction.html\" title=\"ALTER FUNCTION\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER FUNCTION\u003c/span\u003e\u003c/a\u003e and \u003ca href=\"/docs/18/sql-alterprocedure.html\" title=\"ALTER PROCEDURE\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER PROCEDURE\u003c/span\u003e\u003c/a\u003e for more details. Allowing routine names to refer to aggregate functions is a \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e extension.\u003c/p\u003e","key":"compatibility","title":"Compatibility"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/alter-aggregate/?v=18\" title=\"ALTER AGGREGATE\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER AGGREGATE\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/alter-function/?v=18\" title=\"ALTER FUNCTION\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER FUNCTION\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/alter-procedure/?v=18\" title=\"ALTER PROCEDURE\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER PROCEDURE\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-routine/?v=18\" title=\"DROP ROUTINE\"\u003e\u003cspan class=\"refentrytitle\"\u003eDROP ROUTINE\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003cp\u003eNote that there is no \u003ccode class=\"literal\"\u003eCREATE ROUTINE\u003c/code\u003e command.\u003c/p\u003e","key":"see_also","title":"See Also"}],"sections_same_as":"","slug":"18","synopsis_html":"ALTER ROUTINE \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e [ ( [ [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargmode\u003c/code\u003e\u003c/em\u003e ] [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargname\u003c/code\u003e\u003c/em\u003e ] \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargtype\u003c/code\u003e\u003c/em\u003e [, ...] ] ) ]\n    \u003cem class=\"replaceable\"\u003e\u003ccode\u003eaction\u003c/code\u003e\u003c/em\u003e [ ... ] [ RESTRICT ]\nALTER ROUTINE \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e [ ( [ [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargmode\u003c/code\u003e\u003c/em\u003e ] [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargname\u003c/code\u003e\u003c/em\u003e ] \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargtype\u003c/code\u003e\u003c/em\u003e [, ...] ] ) ]\n    RENAME TO \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e\nALTER ROUTINE \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e [ ( [ [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargmode\u003c/code\u003e\u003c/em\u003e ] [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargname\u003c/code\u003e\u003c/em\u003e ] \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargtype\u003c/code\u003e\u003c/em\u003e [, ...] ] ) ]\n    OWNER TO { \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER ROUTINE \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e [ ( [ [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargmode\u003c/code\u003e\u003c/em\u003e ] [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargname\u003c/code\u003e\u003c/em\u003e ] \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargtype\u003c/code\u003e\u003c/em\u003e [, ...] ] ) ]\n    SET SCHEMA \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_schema\u003c/code\u003e\u003c/em\u003e\nALTER ROUTINE \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e [ ( [ [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargmode\u003c/code\u003e\u003c/em\u003e ] [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargname\u003c/code\u003e\u003c/em\u003e ] \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargtype\u003c/code\u003e\u003c/em\u003e [, ...] ] ) ]\n    [ NO ] DEPENDS ON EXTENSION \u003cem class=\"replaceable\"\u003e\u003ccode\u003eextension_name\u003c/code\u003e\u003c/em\u003e\n\n\u003cspan class=\"phrase\"\u003ewhere \u003cem class=\"replaceable\"\u003e\u003ccode\u003eaction\u003c/code\u003e\u003c/em\u003e is one of:\u003c/span\u003e\n\n    IMMUTABLE | STABLE | VOLATILE\n    [ NOT ] LEAKPROOF\n    [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER\n    PARALLEL { UNSAFE | RESTRICTED | SAFE }\n    COST \u003cem class=\"replaceable\"\u003e\u003ccode\u003eexecution_cost\u003c/code\u003e\u003c/em\u003e\n    ROWS \u003cem class=\"replaceable\"\u003e\u003ccode\u003eresult_rows\u003c/code\u003e\u003c/em\u003e\n    SET \u003cem class=\"replaceable\"\u003e\u003ccode\u003econfiguration_parameter\u003c/code\u003e\u003c/em\u003e { TO | = } { \u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e | DEFAULT }\n    SET \u003cem class=\"replaceable\"\u003e\u003ccode\u003econfiguration_parameter\u003c/code\u003e\u003c/em\u003e FROM CURRENT\n    RESET \u003cem class=\"replaceable\"\u003e\u003ccode\u003econfiguration_parameter\u003c/code\u003e\u003c/em\u003e\n    RESET ALL","synopsis_text":"ALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\naction [ ... ] [ RESTRICT ]\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\nRENAME TO new_name\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\nOWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\nSET SCHEMA new_schema\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\n[ NO ] DEPENDS ON EXTENSION extension_name\nwhere action is one of:\n\nIMMUTABLE | STABLE | VOLATILE\n[ NOT ] LEAKPROOF\n[ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER\nPARALLEL { UNSAFE | RESTRICTED | SAFE }\nCOST execution_cost\nROWS result_rows\nSET configuration_parameter { TO | = } { value | DEFAULT }\nSET configuration_parameter FROM CURRENT\nRESET configuration_parameter\nRESET ALL"},"ManualEvidence":{},"MeasuredEvidence":{}},"Text":{"Collection":"sql","Key":"alter-routine","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"ALTER ROUTINE","Summary":"更改一个例程的定义","BodyHTML":"\u003cpre\u003eALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\naction [ ... ] [ RESTRICT ]\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\nRENAME TO new_name\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\nOWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\nSET SCHEMA new_schema\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\n[ NO ] DEPENDS ON EXTENSION extension_name\n其中 action 是以下之一：\n\nIMMUTABLE | STABLE | VOLATILE\n[ NOT ] LEAKPROOF\n[ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER\nPARALLEL { UNSAFE | RESTRICTED | SAFE }\nCOST execution_cost\nROWS result_rows\nSET configuration_parameter { TO | = } { value | DEFAULT }\nSET configuration_parameter FROM CURRENT\nRESET configuration_parameter\nRESET ALL\u003c/pre\u003e\u003csection\u003e\u003ch2\u003e描述\u003c/h2\u003e\u003cp\u003e\u003ccode\u003eALTER ROUTINE\u003c/code\u003e更改一个例程的定义。术语\u003cspan\u003e“\u003cspan\u003e例程\u003c/span\u003e”\u003c/span\u003e包括聚合函数、普通函数和过程。参数说明、更多示例以及进一步细节，请分别参见\u003ca href=\"/docs/18/sql-alteraggregate.html\" title=\"ALTER AGGREGATE\" rel=\"nofollow\"\u003e\u003cspan\u003eALTER AGGREGATE\u003c/span\u003e\u003c/a\u003e、\u003ca href=\"/docs/18/sql-alterfunction.html\" title=\"ALTER FUNCTION\" rel=\"nofollow\"\u003e\u003cspan\u003eALTER FUNCTION\u003c/span\u003e\u003c/a\u003e和\u003ca href=\"/docs/18/sql-alterprocedure.html\" title=\"ALTER PROCEDURE\" rel=\"nofollow\"\u003e\u003cspan\u003eALTER PROCEDURE\u003c/span\u003e\u003c/a\u003e。\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e示例\u003c/h2\u003e\u003cp\u003e将针对\u003ccode\u003einteger\u003c/code\u003e类型的例程\u003ccode\u003efoo\u003c/code\u003e重命名为\u003ccode\u003efoobar\u003c/code\u003e：\u003c/p\u003e\u003cpre\u003eALTER ROUTINE foo(integer) RENAME TO foobar;\n\u003c/pre\u003e\u003cp\u003e不管\u003ccode\u003efoo\u003c/code\u003e是聚合、函数还是过程，这条命令都可以工作。\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e兼容性\u003c/h2\u003e\u003cp\u003e该语句与 SQL 标准中的\u003ccode\u003eALTER ROUTINE\u003c/code\u003e语句部分兼容。更多细节请参见\u003ca href=\"/docs/18/sql-alterfunction.html\" title=\"ALTER FUNCTION\" rel=\"nofollow\"\u003e\u003cspan\u003eALTER FUNCTION\u003c/span\u003e\u003c/a\u003e和\u003ca href=\"/docs/18/sql-alterprocedure.html\" title=\"ALTER PROCEDURE\" rel=\"nofollow\"\u003e\u003cspan\u003eALTER PROCEDURE\u003c/span\u003e\u003c/a\u003e。允许例程名引用聚合函数是\u003cspan\u003ePostgreSQL\u003c/span\u003e的扩展。\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e另见\u003c/h2\u003e\u003cspan\u003e\u003ca href=\"/wiki/sql/alter-aggregate/?v=18\" title=\"ALTER AGGREGATE\" rel=\"nofollow\"\u003e\u003cspan\u003eALTER AGGREGATE\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/alter-function/?v=18\" title=\"ALTER FUNCTION\" rel=\"nofollow\"\u003e\u003cspan\u003eALTER FUNCTION\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/alter-procedure/?v=18\" title=\"ALTER PROCEDURE\" rel=\"nofollow\"\u003e\u003cspan\u003eALTER PROCEDURE\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-routine/?v=18\" title=\"DROP ROUTINE\" rel=\"nofollow\"\u003e\u003cspan\u003eDROP ROUTINE\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003cp\u003e注意，没有\u003ccode\u003eCREATE ROUTINE\u003c/code\u003e命令。\u003c/p\u003e\u003c/section\u003e","SourceRevision":"1b5ca64c","ContentHash":"9ab64833a585e9c1b68836f44f8fc42819f733718cba887b4f22afc95b0e2fb4","Payload":{"purpose_zh":"更改一个例程的定义","sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eALTER ROUTINE\u003c/code\u003e更改一个例程的定义。术语\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e例程\u003c/span\u003e”\u003c/span\u003e包括聚合函数、普通函数和过程。参数说明、更多示例以及进一步细节，请分别参见\u003ca href=\"/docs/18/sql-alteraggregate.html\" title=\"ALTER AGGREGATE\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER AGGREGATE\u003c/span\u003e\u003c/a\u003e、\u003ca href=\"/docs/18/sql-alterfunction.html\" title=\"ALTER FUNCTION\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER FUNCTION\u003c/span\u003e\u003c/a\u003e和\u003ca href=\"/docs/18/sql-alterprocedure.html\" title=\"ALTER PROCEDURE\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER PROCEDURE\u003c/span\u003e\u003c/a\u003e。\u003c/p\u003e","key":"description","title":"描述"},{"html":"\u003cp\u003e将针对\u003ccode class=\"type\"\u003einteger\u003c/code\u003e类型的例程\u003ccode class=\"literal\"\u003efoo\u003c/code\u003e重命名为\u003ccode class=\"literal\"\u003efoobar\u003c/code\u003e：\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER ROUTINE foo(integer) RENAME TO foobar;\n\u003c/pre\u003e\u003cp\u003e不管\u003ccode class=\"literal\"\u003efoo\u003c/code\u003e是聚合、函数还是过程，这条命令都可以工作。\u003c/p\u003e","key":"examples","title":"示例"},{"html":"\u003cp\u003e该语句与 SQL 标准中的\u003ccode class=\"command\"\u003eALTER ROUTINE\u003c/code\u003e语句部分兼容。更多细节请参见\u003ca href=\"/docs/18/sql-alterfunction.html\" title=\"ALTER FUNCTION\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER FUNCTION\u003c/span\u003e\u003c/a\u003e和\u003ca href=\"/docs/18/sql-alterprocedure.html\" title=\"ALTER PROCEDURE\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER PROCEDURE\u003c/span\u003e\u003c/a\u003e。允许例程名引用聚合函数是\u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e的扩展。\u003c/p\u003e","key":"compatibility","title":"兼容性"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/alter-aggregate/?v=18\" title=\"ALTER AGGREGATE\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER AGGREGATE\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/alter-function/?v=18\" title=\"ALTER FUNCTION\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER FUNCTION\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/alter-procedure/?v=18\" title=\"ALTER PROCEDURE\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER PROCEDURE\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-routine/?v=18\" title=\"DROP ROUTINE\"\u003e\u003cspan class=\"refentrytitle\"\u003eDROP ROUTINE\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003cp\u003e注意，没有\u003ccode class=\"literal\"\u003eCREATE ROUTINE\u003c/code\u003e命令。\u003c/p\u003e","key":"see_also","title":"另见"}],"sections_same_as":"","synopsis_html":"ALTER ROUTINE \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e [ ( [ [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargmode\u003c/code\u003e\u003c/em\u003e ] [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargname\u003c/code\u003e\u003c/em\u003e ] \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargtype\u003c/code\u003e\u003c/em\u003e [, ...] ] ) ]\n    \u003cem class=\"replaceable\"\u003e\u003ccode\u003eaction\u003c/code\u003e\u003c/em\u003e [ ... ] [ RESTRICT ]\nALTER ROUTINE \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e [ ( [ [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargmode\u003c/code\u003e\u003c/em\u003e ] [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargname\u003c/code\u003e\u003c/em\u003e ] \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargtype\u003c/code\u003e\u003c/em\u003e [, ...] ] ) ]\n    RENAME TO \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e\nALTER ROUTINE \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e [ ( [ [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargmode\u003c/code\u003e\u003c/em\u003e ] [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargname\u003c/code\u003e\u003c/em\u003e ] \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargtype\u003c/code\u003e\u003c/em\u003e [, ...] ] ) ]\n    OWNER TO { \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER ROUTINE \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e [ ( [ [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargmode\u003c/code\u003e\u003c/em\u003e ] [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargname\u003c/code\u003e\u003c/em\u003e ] \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargtype\u003c/code\u003e\u003c/em\u003e [, ...] ] ) ]\n    SET SCHEMA \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_schema\u003c/code\u003e\u003c/em\u003e\nALTER ROUTINE \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e [ ( [ [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargmode\u003c/code\u003e\u003c/em\u003e ] [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargname\u003c/code\u003e\u003c/em\u003e ] \u003cem class=\"replaceable\"\u003e\u003ccode\u003eargtype\u003c/code\u003e\u003c/em\u003e [, ...] ] ) ]\n    [ NO ] DEPENDS ON EXTENSION \u003cem class=\"replaceable\"\u003e\u003ccode\u003eextension_name\u003c/code\u003e\u003c/em\u003e\n\n\u003cspan class=\"phrase\"\u003e其中 \u003cem class=\"replaceable\"\u003e\u003ccode\u003eaction\u003c/code\u003e\u003c/em\u003e 是以下之一：\u003c/span\u003e\n\n    IMMUTABLE | STABLE | VOLATILE\n    [ NOT ] LEAKPROOF\n    [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER\n    PARALLEL { UNSAFE | RESTRICTED | SAFE }\n    COST \u003cem class=\"replaceable\"\u003e\u003ccode\u003eexecution_cost\u003c/code\u003e\u003c/em\u003e\n    ROWS \u003cem class=\"replaceable\"\u003e\u003ccode\u003eresult_rows\u003c/code\u003e\u003c/em\u003e\n    SET \u003cem class=\"replaceable\"\u003e\u003ccode\u003econfiguration_parameter\u003c/code\u003e\u003c/em\u003e { TO | = } { \u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e | DEFAULT }\n    SET \u003cem class=\"replaceable\"\u003e\u003ccode\u003econfiguration_parameter\u003c/code\u003e\u003c/em\u003e FROM CURRENT\n    RESET \u003cem class=\"replaceable\"\u003e\u003ccode\u003econfiguration_parameter\u003c/code\u003e\u003c/em\u003e\n    RESET ALL","synopsis_text":"ALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\naction [ ... ] [ RESTRICT ]\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\nRENAME TO new_name\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\nOWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\nSET SCHEMA new_schema\nALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]\n[ NO ] DEPENDS ON EXTENSION extension_name\n其中 action 是以下之一：\n\nIMMUTABLE | STABLE | VOLATILE\n[ NOT ] LEAKPROOF\n[ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER\nPARALLEL { UNSAFE | RESTRICTED | SAFE }\nCOST execution_cost\nROWS result_rows\nSET configuration_parameter { TO | = } { value | DEFAULT }\nSET configuration_parameter FROM CURRENT\nRESET configuration_parameter\nRESET ALL"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
