From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | vignesh C <vignesh21(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Enhanced error message to include hint messages for redundant options error |
Date: | 2021-04-26 13:45:10 |
Message-ID: | CALj2ACUs2rnRaGFcb91_KN3DjnwjqvSYBquK-f7oKEFHC63BdQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Apr 26, 2021 at 7:02 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> On Mon, Apr 26, 2021 at 5:49 PM Bharath Rupireddy
> <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
> >
> > On Mon, Apr 26, 2021 at 5:29 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> > >
> > > 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?
> >
> > +1. A more detailed error will be useful in a rare scenario like users
> > have specified duplicate options along with a lot of other options,
> > they will know for which option the error is thrown by the server.
> >
> > Instead of adding errhint or errdetail, how about just changing the
> > error message itself to something like "option \"%s\" specified more
> > than once" or "parameter \"%s\" specified more than once" like we have
> > in other places in the code?
> >
>
> Both seemed fine but I preferred using errdetail as I felt it is
> slightly better for the details to appear in a new line.
Thanks! IMO, it is better to change the error message to "option
\"%s\" specified more than once" instead of adding an error detail.
Let's hear other hackers' opinions.
With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | tanghy.fnst@fujitsu.com | 2021-04-26 13:47:13 | RE: Support tab completion for upper character inputs in psql |
Previous Message | vignesh C | 2021-04-26 13:33:06 | Re: Enhanced error message to include hint messages for redundant options error |