pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: ALTER FOREIGN DATA WRAPPER can drop dependency on handler
Date: Wed, 18 Mar 2026 14:29:58 -0500
Message-ID: <abr9Nhe8UOdoN10L@nathan> (raw)
In-Reply-To: <35c44a4b7fb76d35418c4d66b775a88f4ce60c86.camel@j-davis.com>
References: <35c44a4b7fb76d35418c4d66b775a88f4ce60c86.camel@j-davis.com>

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





view thread (4+ messages)  latest in thread

Message-ID: <abr9Nhe8UOdoN10L@nathan>
Permalink:  ../abr9Nhe8UOdoN10L@nathan/
Also on:    postgresql.org/message-id/abr9Nhe8UOdoN10L@nathan

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: nathandbossart@gmail.com, pgsql@j-davis.com
  Subject: Re: ALTER FOREIGN DATA WRAPPER can drop dependency on handler
  In-Reply-To: <abr9Nhe8UOdoN10L@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox