ALTER ROUTINE <refpurpose>change the definition of a routine</refpurpose> — ルーチンの定義を変更する
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_name<phrase>where <replaceable class="parameter">action</replaceable> is one of:</phrase> ここでactionは以下のいずれかです。 IMMUTABLE | STABLE | VOLATILE [ NOT ] LEAKPROOF [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER PARALLEL { UNSAFE | RESTRICTED | SAFE } COSTexecution_costROWSresult_rowsSETconfiguration_parameter{ TO | = } {value| DEFAULT } SETconfiguration_parameterFROM CURRENT RESETconfiguration_parameterRESET ALL
<command>ALTER ROUTINE</command> changes the definition of a routine, which
can be an aggregate function, a normal function, or a procedure. See
under <xref linkend="sql-alteraggregate"/>, <xref linkend="sql-alterfunction"/>,
and <xref linkend="sql-alterprocedure"/> for the description of the
parameters, more examples, and further details.
ALTER ROUTINEはルーチン、すなわち、集約関数や通常の関数、プロシージャの定義を変更します。
パラメータ説明や更なる例、より詳細については、ALTER AGGREGATE、ALTER FUNCTION、ALTER PROCEDUREを参照してください。
To rename the routine <literal>foo</literal> for type
<type>integer</type> to <literal>foobar</literal>:
integer型に対するルーチンfooをfoobarに名前変更します。
ALTER ROUTINE foo(integer) RENAME TO foobar;
This command will work independent of whether <literal>foo</literal> is an
aggregate, function, or procedure.
このコマンドはfooが集約、関数、プロシージャの何れであるかによらず動作します。
This statement is partially compatible with the <command>ALTER
ROUTINE</command> statement in the SQL standard. See
under <xref linkend="sql-alterfunction"/>
and <xref linkend="sql-alterprocedure"/> for more details. Allowing
routine names to refer to aggregate functions is
a <productname>PostgreSQL</productname> extension.
この文は標準SQLのALTER ROUTINE文と部分的に互換性があります。
より詳しくはALTER FUNCTIONとALTER PROCEDUREを参照してください。
ルーチン名が集約関数を参照できるのはPostgreSQLの拡張です。
Note that there is no <literal>CREATE ROUTINE</literal> command.
CREATE ROUTINEコマンドは無いことに注意してください。