Re: Enhanced error message to include hint messages for redundant options error

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Subject: Re: Enhanced error message to include hint messages for redundant options error
Date: 2021-05-11 13:24:42
Message-ID: CALDaNm0VKWHKDgpT0uFuG=S+zxNuLpi_7VrKJGUJiTYjmgH+NA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 11, 2021 at 2:47 AM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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 Content-Type Size
v7-0001-Enhance-error-message.patch application/x-patch 71.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amul Sul 2021-05-11 13:26:22 Re: [Patch] ALTER SYSTEM READ ONLY
Previous Message Justin Pryzby 2021-05-11 13:24:22 Re: PG 14 release notes, first draft