ALTER FOREIGN DATA WRAPPER can drop dependency on handler - Mailing list pgsql-bugs

From Jeff Davis
Subject ALTER FOREIGN DATA WRAPPER can drop dependency on handler
Date
Msg-id 35c44a4b7fb76d35418c4d66b775a88f4ce60c86.camel@j-davis.com
Whole thread Raw
Responses Re: ALTER FOREIGN DATA WRAPPER can drop dependency on handler
List pgsql-bugs
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


Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Revoke Connect Privilege from Database not working
Next
From: Nathan Bossart
Date:
Subject: Re: ALTER FOREIGN DATA WRAPPER can drop dependency on handler