pgsql: Don't quote the relation name twice in EXCEPT clause errors.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Don't quote the relation name twice in EXCEPT clause errors.
Date: 2026-09-18 05:34:19
Message-ID: E1x7REp-00000000DcV-2ixH@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Don't quote the relation name twice in EXCEPT clause errors.

Commit a49b9cfd72 began reporting the EXCEPT clause relation with a
schema-qualified name that quotes identifiers when needed, inside a
message that already puts the name in quotes. So a schema or relation name
that needs quoting came out quoted twice.

Fix by building the qualified name as "%s.%s" without identifier quoting,
so it renders like the qualified names in other backend error messages.
The message text, and so its translations, is unchanged.
RelationGetQualifiedRelationName() has no callers left, so remove it.

Author: Manuel Reyes Bravo <manuelreyesbravo(at)gmail(dot)com>
Reviewed-by: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Reviewed-by: Vignesh C <vignesh21(at)gmail(dot)com>
Reviewed-by: Peter Smith <smithpb2250(at)gmail(dot)com>
Reviewed-by: Zhijie Hou <houzj(dot)fnst(at)fujitsu(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAHGQGwHfESBexa7fq99EvFCf31av=O9h9udnw22ymxmm6LMZzw@mail.gmail.com
Backpatch-through: 19, where it was introduced

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/926627bf9021137af66ac3bf21d1595af64ec66b

Modified Files
--------------
src/backend/catalog/pg_publication.c | 8 +++++++-
src/backend/utils/cache/relcache.c | 10 ----------
src/include/utils/relcache.h | 1 -
src/test/regress/expected/publication.out | 7 ++++++-
src/test/regress/sql/publication.sql | 5 ++++-
5 files changed, 17 insertions(+), 14 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2026-09-18 06:39:01 pgsql: Say what WAIT's snapshot restriction actually is
Previous Message David Rowley 2026-09-18 05:17:27 pgsql: Fix pruning of DEFAULT partition in RANGE partitioned tables