Re: Distinguish publication exclusions in object addresses - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Distinguish publication exclusions in object addresses
Date
Msg-id CAA4eK1KuMrwZ+JM7yB9Bmg84_UCUiaA+2tV7uG+Gz2dhs+4TLg@mail.gmail.com
Whole thread
In response to Re: Distinguish publication exclusions in object addresses  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
On Fri, Sep 18, 2026 at 8:20 AM Peter Smith <smithpb2250@gmail.com> wrote:
>
> AFAICT, the patch has traded one kind of quoting problem for another.
>
> Before patch v3, the message might show nested quotes.
>
> After patch v3, the message might show mismatched quotes:
> CREATE PUBLICATION testpub9 FOR ALL TABLES EXCEPT (TABLE "schema has
> embedded "" quotes"."part has embedded "" quotes");
> ERROR:  cannot specify relation "schema has embedded " quotes.part has
> embedded " quotes" in the publication EXCEPT clause
>

This is not a problem but a general behavior in other cases as well.
For example, see few:
1.
postgres=# CREATE TABLE "a""b"(x int);
CREATE TABLE
postgres=# CREATE TABLE "a""b"(x int);
ERROR:  relation "a"b" already exists

Notice that the ERROR message contains single embedded quotes whereas
while specifying object there were double-quotes.
2.
postgres=# ALTER TABLE "a""b" ADD COLUMN y int;
ERROR:  relation "a"b" does not exist

Here also the behavior is the same as in previous example

pg_class also shows this table with single quotes as follows:
 16462 | a"b

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: pg_walinspect: add functions to locate and list WAL by time and LSN
Next
From: Haibo Yan
Date:
Subject: Re: Global temporary tables