Re: A doubt about a newly added errdetail

Kyotaro Horiguchi <horikyota.ntt@gmail.com>

From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: alvherre@alvh.no-ip.org
Cc: houzj.fnst@fujitsu.com, amit.kapila16@gmail.com, pgsql-hackers@lists.postgresql.org
Date: 2022-09-28T06:00:34Z
Lists: pgsql-hackers
At Tue, 27 Sep 2022 12:19:35 +0200, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote in 
> Yeah, since you're changing another word in that line, it's ok to move
> the parameter line off-string.  (If you were only changing the parameter
> to %s and there was no message duplication, I would reject the patch as
> useless.)

I'm fine with that. By the way, related to the area, I found the
following error messages.

>	 errmsg("publication \"%s\" is defined as FOR ALL TABLES",
>			NameStr(pubform->pubname)),
>	 errdetail("Schemas cannot be added to or dropped from FOR ALL TABLES publications.")));

It looks tome that the errmsg and errordetail are reversed. Isn't the following order common?

>	 errmsg("schemas cannot be added to or dropped from publication \"%s\".",
>			NameStr(pubform->pubname)),
>	 errdetail("The publication is defined as FOR ALL TABLES.")));

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



Commits

  1. Remove publicationcmds.c's expr_allowed_in_node as a function

  2. Improve some publication-related error messages