Enhanced error message to include hint messages for redundant options error

vignesh C <vignesh21@gmail.com>

From: vignesh C <vignesh21@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-04-26T11:58:55Z
Lists: pgsql-hackers

Attachments

Hi,

While reviewing one of the logical replication patches, I found that
we do not include hint messages to display the actual option which has
been specified more than once in case of redundant option error. I
felt including this will help in easily identifying the error, users
will not have to search through the statement to identify where the
actual error is present. Attached a patch for the same.
Thoughts?

Regards,
Vignesh

Commits

  1. Improve reporting of "conflicting or redundant options" errors.

  2. Refactor function parse_subscription_options.