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

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: vignesh C <vignesh21(at)gmail(dot)com>
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-10 21:17:14
Message-ID: 20210510211714.GA32638@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2021-05-10 22:57:03 Re: Reducing opr_sanity test's runtime under CLOBBER_CACHE_ALWAYS
Previous Message Andres Freund 2021-05-10 20:52:14 Re: Reducing opr_sanity test's runtime under CLOBBER_CACHE_ALWAYS