-- Check if the function in the database
vcdb=# \df remove_cafe_resource;
List of functions
Schema | Name | Result data type | Argument data types | Type
--------+----------------------+------------------+---------------------------------+--------
public | remove_cafe_resource | void | resource_name character varying | normal
(1 row)
-- Attempt to drop the function without parameter it should fail but telling me that it does not exist instead.
vcdb=# drop function remove_cafe_resource();
ERROR: function remove_cafe_resource() does not exist
-- Script to drop it. Copy and paste it to drop the function.
select 'drop function ' || oid::regproc || '(' || pg_get_function_identity_arguments(oid) || ');' FROM pg_proc WHERE proname = 'remove_cafe_resource' AND pg_function_is_visible(oid);
?column?
----------------------------------------------------------------------
drop function remove_cafe_resource(resource_name character varying);
(1 row)
-- Dropped
drop function remove_cafe_resource(resource_name character varying);
DROP FUNCTION
vcdb=# \df remove_cafe_resource;
List of functions
Schema | Name | Result data type | Argument data types | Type
--------+------+------------------+---------------------+------
(0 rows)