| PostgreSQL 8.0.12 Documentation | ||||
|---|---|---|---|---|
| Prev | Fast Backward | Fast Forward | Next | |
ALTER FUNCTION name ( [ type [, ...] ] ) RENAME TO newname ALTER FUNCTION name ( [ type [, ...] ] ) OWNER TO newowner
The name (optionally schema-qualified) of an existing function.
The data type of an argument of the function.
The new name of the function.
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.
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;
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.
No comments could be found for this page.
Please use this form to add your own comments regarding your experience with particular features of PostgreSQL, clarifications of the documentation, or hints for other users. Please note, this is not a support forum, and your IP address will be logged. If you have a question or need help, please see the faq, try a mailing list, or join us on IRC. Note that submissions containing URLs or other keywords commonly found in 'spam' comments may be silently discarded. Please contact the webmaster if you think this is happening to you in error.
In order to submit a comment, you must have a community account.
* denotes required field