A function can be created or replaced using the same syntax except for the keywords CREATE and REPLACE.
If you specify CREATE, the function must not exist.
If you specify REPLACE, you can either create a new function or replace an existing function with the following restriction: if the function to be replaced was originally created with a specific function name, then that specific function name must be used for the REPLACE FUNCTION statement.
The advantage to using REPLACE is that you can avoid having to grant the EXECUTE privilege again to all users who already had that privilege on the function.