Good job! To change the name of a function, we will need to use the
ALTER command in combination with the
RENAME TO command.
Here we change the name of the
get_circle_area(radius decimal) function to
ALTER FUNCTION get_circle_area(radius decimal)
RENAME TO circle_area;
As you can see, the first command is
ALTER FUNCTION, followed by the name of the original function. Then, we include the types of its arguments to identify the function. We may write the arguments' names and/or modes for legibility. Then comes the
RENAME TO command, followed by the new function name (
circle_area, in this case).