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

From Dilip Kumar
Subject Re: Enhanced error message to include hint messages for redundant options error
Date
Msg-id CAFiTN-u5q_w8nX1UrChmZFtzbwyWA77QmRtJD2zxDP4TBJWCwA@mail.gmail.com
Whole thread Raw
In response to Re: Enhanced error message to include hint messages for redundant options error  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Enhanced error message to include hint messages for redundant options error
List pgsql-hackers
On Fri, Apr 30, 2021 at 10:43 AM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> On Fri, Apr 30, 2021 at 10:17 AM Dilip Kumar <dilipbalaut@gmail.com> wrote:
> > In this function, we already have the "defel" variable then I do not
> > understand why you are using one extra variable and assigning defel to
> > that?
> > If the goal is to just improve the error message then you can simply
> > use defel->defname?
>
> Yeah. I can do that. Thanks for the comment.
>
> While on this, I also removed  the duplicate_error and procedure_error
> goto statements, because IMHO, using goto statements is not an elegant
> way. I used boolean flags to do the job instead. See the attached and
> let me know what you think.

Okay, but I see one side effect of this, basically earlier on
procedure_error and duplicate_error we were not assigning anything to
output parameters, e.g. volatility_item,  but now those values will be
assigned with defel even if there is an error.  So I think we should
better avoid such change.  But even if you want to do then better
check for any impacts on the caller.

-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Remove redundant variable from transformCreateStmt
Next
From: Bharath Rupireddy
Date:
Subject: Re: Enhanced error message to include hint messages for redundant options error