Re: Enhanced error message to include hint messages for redundant options error - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Enhanced error message to include hint messages for redundant options error
Date
Msg-id 20210501172409.GA21641@alvherre.pgsql
Whole thread Raw
In response to Re: Enhanced error message to include hint messages for redundant options error  (vignesh C <vignesh21@gmail.com>)
Responses Re: Enhanced error message to include hint messages for redundant options error  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Re: Enhanced error message to include hint messages for redundant options error  (vignesh C <vignesh21@gmail.com>)
List pgsql-hackers
On 2021-May-01, vignesh C wrote:

> On Thu, Apr 29, 2021 at 10:44 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> >
> > On 2021-Apr-29, vignesh C wrote:
> >
> > > Thanks for the comments, please find the attached v3 patch which has
> > > the change for the first part.
> >
> > Looks good to me.  I would only add parser_errposition() to the few
> > error sites missing that.
> 
> I have not included parser_errposition as ParseState was not available
> for these errors.

Yeah, it's tough to do that in a few of those such as validator
functions, and I don't think we'd want to do that.  However there are
some cases where we can easily add the parsestate as an argument -- for
example CreatePublication can get it in ProcessUtilitySlow and pass it
down to parse_publication_options; likewise for ExecuteDoStmt.  I didn't
check other places.

-- 
Álvaro Herrera                            39°49'30"S 73°17'W



pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: [PATCH] Identify LWLocks in tracepoints
Next
From: Bharath Rupireddy
Date:
Subject: Re: Enhanced error message to include hint messages for redundant options error