ALTER ROUTINE <refpurpose>change the definition of a routine</refpurpose> — ルーチンの定義を変更する
ALTER ROUTINEname
[ ( [ [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
<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_cost
ROWSresult_rows
SETconfiguration_parameter
{ TO | = } {value
| DEFAULT } SETconfiguration_parameter
FROM CURRENT RESETconfiguration_parameter
RESET 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
コマンドは無いことに注意してください。