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

From vignesh C
Subject Re: Enhanced error message to include hint messages for redundant options error
Date
Msg-id CALDaNm0VKWHKDgpT0uFuG=S+zxNuLpi_7VrKJGUJiTYjmgH+NA@mail.gmail.com
Whole thread Raw
In response to Re: Enhanced error message to include hint messages for redundant options error  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
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  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On Tue, May 11, 2021 at 2:47 AM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> On 2021-May-10, vignesh C wrote:
>
> > That sounds fine to me, Attached v6 patch which has the changes for the same.
>
> What about defining a function (maybe a static inline function in
> defrem.h) that is marked noreturn and receives the DefElem and
> optionally pstate, and throws the error?  I think that would avoid the
> patch's need to have half a dozen copies of the "duplicate_error:" label
> and ereport stanza.

Thanks for the comment, this reduces a significant amount of code.
Attached patch has the changes incorporated.

Regards,
Vignesh

Attachment

pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: PG 14 release notes, first draft
Next
From: Amul Sul
Date:
Subject: Re: [Patch] ALTER SYSTEM READ ONLY