Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Amul Sul <sulamul(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options
Date: 2021-07-02 02:06:22
Message-ID: CAA4eK1+KrK4dNP=bvTRuBp5xxCPQjeKUBA1L_m5x_T8O3Pe-Uw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 1, 2021 at 8:00 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> I find the business with OPT_NONE a bit uselessly verbose. It's like we
> haven't completely made up our minds that zero means no options set.
> Wouldn't it be simpler to remove that #define and leave the variable
> uninitialized until we want to set the options we want, and then use
> plain assignment instead of |= ?
>

Yeah, that makes sense. I have removed its usage from
CreateSubscription but I think we can get rid of it entirely as well.

The latest patch sent by Bharath looks good to me. Would you like to
commit it or shall I take care of it?

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Schneider (AWS), Jeremy 2021-07-02 02:12:01 Re: relation OID in ReorderBufferToastReplace error message
Previous Message Amit Langote 2021-07-02 02:05:08 Re: Allow batched insert during cross-partition updates