pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve parsing of options of CREATE/ALTER SUBSCRIPTION
Date: Wed, 08 Dec 2021 03:36:59 +0000
Message-ID: <E1munlL-00026P-Pr@gemulon.postgresql.org> (raw)

Improve parsing of options of CREATE/ALTER SUBSCRIPTION

This simplifies the code so as it is not necessary anymore for the
caller of parse_subscription_options() to zero SubOpts, holding a
bitmaps of the provided options as well as the default/parsed option
values.  This also simplifies some checks related to the options
supported by a command when checking for incompatibilities.

While on it, the errors generated for unsupported combinations with
"slot_name = NONE" are reordered.  This may generate a different errors
compared to the previous major versions, but users have to go through
all those errors to get a correct command in this case when using
incorrect values for options "enabled" and "create\slot", so at the end
the resulting command would remain the same.

Author: Peter Smith
Reviewed-by: Nathan Bossart
Discussion: https://postgr.es/m/CAHut+PtXHfLgLHDDJ8ZN5f5Be_37mJoxpEsRg8LNmm4XCr06Rw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/00029deaf65aad47044d9290fe80f2f68601f7ac

Modified Files
--------------
src/backend/commands/subscriptioncmds.c    | 73 ++++++++++++++----------------
src/test/regress/expected/subscription.out |  2 +-
src/test/regress/sql/subscription.sql      |  2 +-
3 files changed, 35 insertions(+), 42 deletions(-)



Message-ID: <E1munlL-00026P-Pr@gemulon.postgresql.org>
Permalink:  ../E1munlL-00026P-Pr@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1munlL-00026P-Pr@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Improve parsing of options of CREATE/ALTER SUBSCRIPTION
  In-Reply-To: <E1munlL-00026P-Pr@gemulon.postgresql.org>
  References: <E1munlL-00026P-Pr@gemulon.postgresql.org>

* 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