Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Peter Smith <smithpb2250@gmail.com>, Michael Paquier <michael@paquier.xyz>, Amul Sul <sulamul@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-02T02:06:22Z
Lists: pgsql-hackers
On Thu, Jul 1, 2021 at 8:00 PM Alvaro Herrera <alvherre@alvh.no-ip.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.
Commits
-
Refactor function parse_subscription_options.
- 8aafb0261675 15.0 landed
-
Refactor function parse_output_parameters.
- 531737ddad21 14.0 cited
-
Refactor option handling of CLUSTER, REINDEX and VACUUM
- a3dc926009be 14.0 cited
-
Add assertion to quiet Coverity
- b1ff33fd9bb8 10.0 cited