Refactor "mutually exclusive options" error reporting code in parse_subscription_options

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Refactor "mutually exclusive options" error reporting code in parse_subscription_options
Date: 2021-05-19 08:38:38
Message-ID: CALj2ACXtoQczfNsDQWobypVvHbX2DtgEHn8DawS0eGFwuo72kw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

parse_subscription_options function has some similar code when
throwing errors [with the only difference in the option]. I feel we
could just use a variable for the option and use it in the error.
While this has no benefit at all, it saves some LOC and makes the code
look better with lesser ereport(ERROR statements. PSA patch.

Thoughts?

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
v1-0001-Refactoring-of-error-code-in-parse_subscription_o.patch application/x-patch 3.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amul Sul 2021-05-19 09:02:28 Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options
Previous Message Bharath Rupireddy 2021-05-19 08:33:19 Re: Added missing tab completion for alter subscription set option