Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options
Amul Sul <sulamul@gmail.com>
From: Amul Sul <sulamul@gmail.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-05-19T09:02:28Z
Lists: pgsql-hackers
On Wed, May 19, 2021 at 2:09 PM Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote: > > 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? I don't have a strong opinion on this, but the patch should add __translator__ help comment for the error msg. Regards, Amul
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