The CASCADE option allows you to remove the table and its dependent objects. The RESTRICT option rejects the removal if there is any object depends on the table. The RESTRICT option is the default if you don't explicitly specify it in the DROP TABLE statement.
The syntax to a drop a function in Oracle is: DROP FUNCTION function_name; function_name.
In PostgreSQL, the REPLACE function is used to search and replace all occurrences of a string with a new one. Syntax: REPLACE(source, old_text, new_text ); Let's analyze the above syntax: The source is a string where you want to replace the existing string.
In Postgres functions can be overloaded, so parameters are necessary to distinguish overloaded functions. To unambiguously identify a function you can put only types of its parameters.
DROP FUNCTION IF EXISTS Foo(INT);
As of Postgres 10 you can drop functions by name only, as long as the names are unique to their schema.
Example:
drop function if exists Foo;
Documentation here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With