From: | vignesh C <vignesh21(at)gmail(dot)com> |
---|---|
To: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
Cc: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, 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-05-01 13:55:15 |
Message-ID: | CALDaNm3vDsyzR5BuBSSsNO2kFhUeHZOizPzae86DWoRZ3yyAKQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, May 1, 2021 at 10:47 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> On Sat, May 1, 2021 at 10:43 AM Bharath Rupireddy
> <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
> >
> > On Fri, Apr 30, 2021 at 2:49 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> > > Looking into this again, why not as shown below? IMHO, this way the
> > > code will be logically the same as it was before the patch, basically
> > > why to process an extra statement ( *volatility_item = defel;) if we
> > > have already decided to error.
> >
> > I changed my mind given the concerns raised on removing the goto
> > statements. We could just do as below:
>
> Okay, that make sense.
>
> > diff --git a/src/backend/commands/functioncmds.c
> > b/src/backend/commands/functioncmds.c
> > index 9548287217..1f1c74c379 100644
> > --- a/src/backend/commands/functioncmds.c
> > +++ b/src/backend/commands/functioncmds.c
> > @@ -575,7 +575,7 @@ compute_common_attribute(ParseState *pstate,
> > duplicate_error:
> > ereport(ERROR,
> > (errcode(ERRCODE_SYNTAX_ERROR),
> > - errmsg("conflicting or redundant options"),
> > + errmsg("option \"%s\" specified more than once", defel->defname),
> > parser_errposition(pstate, defel->location)));
> > return false; /* keep compiler quiet */
> >
> > I'm not attaching above one line change as a patch, maybe Vignesh can
> > merge this into the main patch.
Thanks for the comments. I have merged the change into the attached patch.
Thoughts?
Regards,
Vignesh
Attachment | Content-Type | Size |
---|---|---|
v4-0001-Enhance-error-message.patch | text/x-patch | 47.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | vignesh C | 2021-05-01 13:56:44 | Re: Enhanced error message to include hint messages for redundant options error |
Previous Message | Andrey Borodin | 2021-05-01 12:35:09 | Re: Incorrect snapshots while promoting hot standby node when 2PC is used |