CREATE FUNCTION test_fdw_handler()
RETURNS fdw_handler
AS :'regresslib', 'test_fdw_handler'
LANGUAGE C;
CREATE FOREIGN DATA WRAPPER test_fdw HANDLER test_fdw_handler;
-- correctly raises dependency ERROR
DROP FUNCTION test_fdw_handler;
ALTER FOREIGN DATA WRAPPER test_fdw VALIDATOR postgresql_fdw_validator;
-- fails to raise dependency error ERROR
DROP FUNCTION test_fdw_handler;
Patch attached.
Note: I found this while investigating a related issue for the FDW
connection function, with patch here:
https://www.postgresql.org/message-id/fd49b44dc65da8e71ab20c1cf1ec7e65921c20f5.camel@j-davis.com
I am keeping this patch separate for a clean backport.
Regards,
Jeff Davis