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: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-05-19T08:38:38Z
Lists: pgsql-hackers
Attachments
- v1-0001-Refactoring-of-error-code-in-parse_subscription_o.patch (application/x-patch) patch v1-0001
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
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