RE: A doubt about a newly added errdetail

From: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: RE: A doubt about a newly added errdetail
Date: 2022-09-26 11:15:48
Message-ID: OS0PR01MB571627BEC26F06A36CA431A794529@OS0PR01MB5716.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Monday, September 26, 2022 5:03 PM houzj(dot)fnst(at)fujitsu(dot)com wrote:
>
> On Monday, September 26, 2022 4:57 PM Amit Kapila
> <amit(dot)kapila16(at)gmail(dot)com>
> >
> > On Mon, Sep 26, 2022 at 2:03 PM Alvaro Herrera
> > <alvherre(at)alvh(dot)no-ip(dot)org>
> > wrote:
> > >
> > > On 2022-Sep-26, Amit Kapila wrote:
> > >
> > > > On Mon, Sep 26, 2022 at 1:10 PM Alvaro Herrera
> > <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> > >
> > > > > ERROR: cannot use column list for relation "%s.%s" in publication "%s"
> > > > > DETAIL: Column lists cannot be specified in publications
> > > > > containing FOR
> > TABLES IN SCHEMA elements.
> > > >
> > > > This looks mostly good to me. BTW, is it a good idea to add ".. in
> > > > publication "%s"" to the error message as this can happen even
> > > > during create publication?
> > >
> > > Hmm, I don't see why not. The publication is new, sure, but it
> > > would already have a name, so there's no possible confusion as to
> > > what this means.
> > >
> > > (My main change was to take the word "publication" out of the phrase
> > > "publication column list", because that seemed a bit strange; it
> > > isn't the publication that has a column list, but the relation.)
> > >
> >
> > Okay, that makes sense.
>
> +1
>
> > >
> > > > If so, I think we can change the nearby message as below to
> > > > include the same:
> > > >
> > > > if (!pubviaroot &&
> > > > pri->relation->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
> > > > ereport(ERROR,
> > > > (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
> > > > errmsg("cannot use publication column list for relation \"%s\"",
> > >
> > > WFM.
> > >
> >
> > Okay.
>
> While reviewing this part, I notice an unused parameter(queryString) of function
> CheckPubRelationColumnList. I feel we can remove that as well while on it. I plan
> to post a patch to fix the error message and parameter soon.
>

Attach the patch. (The patch can apply on both HEAD and PG15)

Best regards,
Hou zj

Attachment Content-Type Size
0001-Improve-some-error-messages.patch application/octet-stream 8.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2022-09-26 11:46:29 Re: Differentiate MERGE queries with different structures
Previous Message Tom Lane 2022-09-26 11:14:16 Re: kerberos/001_auth test fails on arm CPU darwin