| From: | "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com> |
|---|---|
| To: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
| Cc: | Manuel Reyes Bravo <manuelreyesbravo(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, vignesh C <vignesh21(at)gmail(dot)com> |
| Subject: | RE: Distinguish publication exclusions in object addresses |
| Date: | 2026-09-16 10:23:42 |
| Message-ID: | TY4PR01MB17718424B75122A8D12257A5694B92@TY4PR01MB17718.jpnprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Wednesday, September 16, 2026 6:14 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
> On Wed, Sep 16, 2026 at 3:24 PM Zhijie Hou (Fujitsu)
> > On Wednesday, September 16, 2026 5:20 PM Manuel Reyes Bravo
> <manuelreyesbravo(at)gmail(dot)com> wrote:
> > > CREATE TABLE t2(a int);
> > > CREATE SCHEMA s2; CREATE TABLE s2.t2(a int);
> > > CREATE PUBLICATION pub FOR ALL TABLES EXCEPT (TABLE s2.t2);
> > >
> > > SELECT pg_get_object_address('publication relation','{s2,t2}','{pub}');
> > > ERROR: "t2" is not a published relation of publication "pub"
> > >
> > > So the message says that "t2" is not a published relation of pub, while
> > > the catalog says that a t2 is. They are different tables, and the user
> > > cannot tell which one the message is about.
> >
> > In this case, the user is explicitly passing s2.t2 as a parameter to get its
> > object address. In that context, it's pretty clear to me that t2 in the message
> > refers exactly to the object the user passed, I personally don't think it could
> > point to any other table.
>
> I agree that there is no confusion in above case. But I also don't see
> any harm in having a schema-qualified name. It makes the message
> clearer. The cases like below can become more understandable with
> schema qualified name.
There is no harm, but it is not consistent with the other object
messages used here (e.g., they do not report schema-qualified names):
get_relation_by_qualified_name
get_object_address_attribute
get_object_address_attrdef
get_object_address_unqualified
get_object_address_type
...
So it does not look necessary to me to add it for our publication case.
The column list error message reports schema-qualified names because users can
specify multiple tables with the same name from different schemas, so it's
necessary there. But that's not our case.
Best Regards,
Zhijie Hou
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Etsuro Fujita | 2026-09-16 10:25:34 | Re: Several issues with postgres_fdw stats import |
| Previous Message | shveta malik | 2026-09-16 10:13:46 | Re: Distinguish publication exclusions in object addresses |