ALTER PROCEDURE v15

Name

ALTER PROCEDURE Modify an existing procedure.

Synopsis

ALTER PROCEDURE <procedure_name> <options> [RESTRICT]

Description

Use the ALTER PROCEDURE statement to specify that a procedure is a SECURITY INVOKER or SECURITY DEFINER.

Parameters

procedure_name

The (possibly schema-qualified) name of a stored procedure.

options can be:

  • [EXTERNAL] SECURITY DEFINER

    Specify SECURITY DEFINER to execute the procedure with the privileges of the user that created the procedure. The EXTERNAL keyword is accepted for compatibility but ignored.

  • [EXTERNAL] SECURITY INVOKER

    Specify SECURITY INVOKER to execute the procedure with the privileges of the user that's invoking the procedure. The EXTERNAL keyword is accepted for compatibility but ignored.

The RESTRICT keyword is accepted for compatibility but ignored.

Examples

This command specifies for the update_balance to execute with the privileges of the user invoking the procedure:

ALTER PROCEDURE update_balance SECURITY INVOKER;

See also

CREATE PROCEDURE, DROP PROCEDURE