云数据库 GAUSSDB-ALTER FUNCTION:语法格式

时间:2024-11-02 18:53:01

语法格式

  • 修改自定义函数的附加参数。
    ALTER FUNCTION function_name ( [ { [ argname ] [ argmode ] argtype} [, ...] ] )
        action [ ... ] [ RESTRICT ];

    其中附加参数action子句语法为。

    {CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT}
     | {IMMUTABLE | STABLE | VOLATILE}
     | {SHIPPABLE | NOT SHIPPABLE}
     | {NOT FENCED | FENCED}
     | [ NOT ] LEAKPROOF
     | { [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER }
     | AUTHID { DEFINER | CURRENT_USER }
     | COST execution_cost
     | ROWS result_rows
     | SET configuration_parameter { { TO | = } { value | DEFAULT }| FROM CURRENT}
     | RESET {configuration_parameter | ALL}
  • 修改自定义函数的名称。
    ALTER FUNCTION funname ( [ { [ argname ] [ argmode ] argtype} [, ...] ] )
        RENAME TO new_name;
  • 修改自定义函数的所属者。
    ALTER FUNCTION funname ( [ { [ argname ] [ argmode ] argtype} [, ...] ] )
        OWNER TO new_owner;
  • 修改自定义函数的模式。
    ALTER FUNCTION funname ( [ { [ argname ] [ argmode ] argtype} [, ...] ] )
        SET SCHEMA new_schema;
support.huaweicloud.com/centralized-devg-v2-gaussdb/devg_03_0496.html