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

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, 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-12 16:39:22
Message-ID: CALDaNm2aw0=nwitvowZ2DS88tBOWJf_-GNGVsRim_+kPYWo30Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jul 11, 2021 at 3:23 PM Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
>
> On Sat, 10 Jul 2021 at 18:09, vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > I'm planning to handle conflicting errors separately after this
> > current work is done, once the patch is changed to have just the valid
> > scenarios(removing the scenarios you have pointed out) existing
> > function can work as is without any changes. Thoughts?
>
> Ah OK, that might be reasonable. Perhaps, then errorDuplicateDefElem()
> and errorConflictingDefElem() would be better than what I originally
> suggested.
>
> BTW, another case I spotted was this:
>
> copy (select 1) to stdout csv csv header;
> ERROR: option "format" specified more than once
> LINE 1: copy (select 1) to stdout csv csv header;
> ^
>

Thanks for your comments, I have made the changes for the same in the
V10 patch attached.
Thoughts?

Regards,
Vignesh

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-07-12 16:41:22 Re: Inaccurate error message when set fdw batch_size to 0
Previous Message Magnus Hagander 2021-07-12 16:28:40 Re: PROXY protocol support