Re: Enhanced error message to include hint messages for redundant options error

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Subject: Re: Enhanced error message to include hint messages for redundant options error
Date: 2021-07-08 13:40:36
Message-ID: CALDaNm0wUyzgJob_Ww5bu4yphNMVBX6_NLdGr2Gpib3FxmQypg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 8, 2021 at 1:52 AM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
> > On 6 Jul 2021, at 17:08, vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> > The patch was not applying on the head because of the recent commit
> > "8aafb02616753f5c6c90bbc567636b73c0cbb9d4", attached patch which is
> > rebased on HEAD.
>
> I sort of like the visual cue of seeing ereport(ERROR .. since it makes it
> clear it will break execution then and there, this will require a lookup for
> anyone who don't know the function by heart. That being said, reducing
> duplicated boilerplate has clear value and this reduce the risk of introducing
> strings which are complicated to translate. On the whole I think this is a net
> win, and the patch looks pretty good.
>
> - DefElem *defel = (DefElem *) lfirst(option);
> + defel = (DefElem *) lfirst(option);
> Any particular reason to include this in the patch?
>

Thanks for identifying this, this change is not needed, this was
required in my previous solution based on goto label. As we have made
these changes into a common function. This change is not required,
Attached v9 patch which removes these changes.

Regards,
Vignesh

Attachment Content-Type Size
v9-0001-Enhance-error-message-to-include-option-name-in-c.patch application/x-patch 66.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2021-07-08 13:40:39 Re: [PoC] Improve dead tuple storage for lazy vacuum
Previous Message David Rowley 2021-07-08 13:38:18 Re: [PATCH] expand the units that pg_size_pretty supports on output