Re: Include schema-qualified names in publication error messages.

Euler Taveira <euler@eulerto.com>

From: "Euler Taveira" <euler@eulerto.com>
To: "vignesh C" <vignesh21@gmail.com>, "Amit Kapila" <amit.kapila16@gmail.com>
Cc: "Dilip Kumar" <dilipbalaut@gmail.com>, "shveta.malik@gmail.com" <shveta.malik@gmail.com>, "Peter Smith" <smithpb2250@gmail.com>, "PostgreSQL Hackers" <pgsql-hackers@lists.postgresql.org>
Date: 2026-05-07T12:27:09Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Use schema-qualified names in EXCEPT clause error messages.

On Thu, May 7, 2026, at 3:00 AM, vignesh C wrote:
>
> * v5-0001-Include-schema-qualified-names-in-EXCEPT-clause-e.patch
> * v5-0002-Include-schema-qualified-names-in-non-EXCEPT-publ.patch

Regarding v5-0002:

 check_publication_add_relation(PublicationRelInfo *pri)
 {
 	Relation	targetrel = pri->relation;
-	const char *relname;
 	const char *errormsg;
 
 	if (pri->except)
-	{
-		relname = get_relation_qualified_name(targetrel);
 		errormsg = gettext_noop("cannot specify relation \"%s\" in the publication EXCEPT clause");
-	}
 	else
-	{
-		relname = RelationGetRelationName(targetrel);
 		errormsg = gettext_noop("cannot add relation \"%s\" to publication");
-	}

Why did you remove relname variable? In addition to reduce the patch size, you
avoid increasing the number of modifications if the function
get_relation_qualified_name is modified in the future.


-- 
Euler Taveira
EDB   https://www.enterprisedb.com/