Provided by:

postgresql-client-8.0_8.0.7-2build1_i386 **NAME**

ALTER FUNCTION - change the definition of a function

**SYNOPSIS**

ALTER FUNCTION __name__ ( [ __type__ [, ...] ] ) RENAME TO __newname__
ALTER FUNCTION __name__ ( [ __type__ [, ...] ] ) OWNER TO __newowner__

**DESCRIPTION**

**ALTER** **FUNCTION** changes the definition of a function.

**PARAMETERS**

__name__ The name (optionally schema-qualified) of an existing function.
__type__ The data type of an argument of the function.
__newname__
The new name of the function.
__newowner__
The new owner of the function. To change the owner of a
function, you must be a superuser. Note that if the function is
marked SECURITY DEFINER, it will subsequently execute as the new
owner.

**EXAMPLES**

To rename the function sqrt for type **integer** to square_root:
ALTER FUNCTION sqrt(integer) RENAME TO square_root;
To change the owner of the function sqrt for type **integer** to joe:
ALTER FUNCTION sqrt(integer) OWNER TO joe;

**COMPATIBILITY**

There is an **ALTER** **FUNCTION** statement in the SQL standard, but it does
not provide the option to rename the function or change the owner.

**SEE** **ALSO**

CREATE FUNCTION [**create_function**(7)], DROP FUNCTION [**drop_function**(l)]