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

From Nathan Bossart
Subject Re: ALTER FOREIGN DATA WRAPPER can drop dependency on handler
Date
Msg-id abr9Nhe8UOdoN10L@nathan
Whole thread Raw
In response to ALTER FOREIGN DATA WRAPPER can drop dependency on handler  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: ALTER FOREIGN DATA WRAPPER can drop dependency on handler
List pgsql-bugs
On Wed, Mar 18, 2026 at 12:09:54PM -0700, Jeff Davis wrote:
> --- a/src/backend/commands/foreigncmds.c
> +++ b/src/backend/commands/foreigncmds.c
> @@ -786,6 +786,11 @@ AlterForeignDataWrapper(ParseState *pstate, AlterFdwStmt *stmt)
>          ereport(WARNING,
>                  (errmsg("changing the foreign-data wrapper handler can change behavior of existing foreign
tables")));
>      }
> +    else
> +    {
> +        /* handler unchanged */
> +        fdwhandler = fdwForm->fdwhandler;
> +    }

This matches what we do for the validator a few lines down, so it makes
sense to me.  Could it be worth adding a test or two?

-- 
nathan



pgsql-bugs by date:

Previous
From: Jeff Davis
Date:
Subject: ALTER FOREIGN DATA WRAPPER can drop dependency on handler
Next
From: Jeff Davis
Date:
Subject: Re: ALTER FOREIGN DATA WRAPPER can drop dependency on handler