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

Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>

From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Peter Smith <smithpb2250@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, Amul Sul <sulamul@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-06-01T14:55:16Z
Lists: pgsql-hackers

Attachments

On Mon, May 24, 2021 at 7:04 AM Michael Paquier <michael@paquier.xyz> wrote:
>  Please see a3dc926 and the surrounding discussion for reasons why we've
>  been using bitmaps for option parsing lately.

Thanks for the suggestion. Here's a WIP patch implementing the
subscription command options as bitmaps similar to what commit a3dc926
did. Thoughts?

If the attached WIP patch seems reasonable, I would also like to
implement a similar idea for the parse_publication_options although
there are only two options right now. Thoughts?

With Regards,
Bharath Rupireddy.

Commits

  1. Refactor function parse_subscription_options.

  2. Refactor function parse_output_parameters.

  3. Refactor option handling of CLUSTER, REINDEX and VACUUM

  4. Add assertion to quiet Coverity