alter_function(7)

alter_function7

Change the definition of a function

Usage

ALTER FUNCTION name ( [ type [, ...] ] ) RENAME TO newname

Overview

ALTER FUNCTION changes the definition of a function. The only functionality is to rename the 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.

Examples

To rename the function sqrt for type integer to square_root:

ALTER FUNCTION sqrt(integer) RENAME TO square_root;

Compatibility

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

From postgresql 7.4.7-6sarge6 in Debian 3.1 (Sarge). Parsed by carta from the page's man source.