Re: Distinguish publication exclusions in object addresses

From: vignesh C <vignesh21(at)gmail(dot)com>
To: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Manuel Reyes Bravo <manuelreyesbravo(at)gmail(dot)com>
Subject: Re: Distinguish publication exclusions in object addresses
Date: 2026-09-17 10:33:17
Message-ID: CALDaNm08NcXWkwMHUbVACvBMmvo4jz0faWoxrnLh7JqXPK4nCA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 17 Sept 2026 at 15:25, Zhijie Hou (Fujitsu)
<houzj(dot)fnst(at)fujitsu(dot)com> wrote:
>
> Hi,
>
> On Thursday, September 17, 2026 2:11 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > Seeing the other usage, I am thinking to fix this case for except tables unless
> > some major change is required. We can consider changing REFRESH
> > MATERIALIZED VIEW CONCURRENTLY separately. I have few points for the
> > that patch:
> >
> > * The existing function
> > RelationGetQualifiedRelationName()->get_qualified_objname() used
> > get_namespace_name_or_temp() where as patch used
> > get_namespace_name().
> > That could create the problem with temp tables as follows:
> >
> > Before patch:
> > postgres=# create publication mypub for all tables except(table mytemp);
> > ERROR: cannot specify relation "pg_temp.mytemp" in the publication EXCEPT
> > clause
> > DETAIL: This operation is not supported for temporary tables.
> >
> > After patch:
> > postgres=# create publication mypub for all tables except(table mytemp);
> > ERROR: cannot specify relation "pg_temp_0.mytemp" in the publication
> > EXCEPT clause
> > DETAIL: This operation is not supported for temporary tables.
>
> I checked the output for temporary objects a bit and found that the current
> style is not consistent with other error messages and commands. For example,
> other error messages output the actual schema name (pg_temp_xxx), while the
> message touched in the patch reports only pg_temp.
>
> I see this was changed since the original a49b9cf, which schema-qualified the
> message. Although reporting pg_temp has some merits, it doesn't seem great to
> change only one part of the error messages here. Maybe we can use pg_temp_xxx
> for now and try to find a more general way to improve it later if needed.

That seems better, here is an updated v3 version to handle the same.
Same patch applies on pg19 branch and tests passes in both the
branches.

Regards,
Vignesh

Attachment Content-Type Size
v3-0001-Don-t-quote-the-relation-name-twice-in-EXCEPT-cla.patch application/octet-stream 5.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Henson Choi 2026-09-17 10:38:31 Re: [SQL/PGQ] Native executor for Graph query
Previous Message Alexander Korotkov 2026-09-17 10:13:26 Re: Reject WAIT FOR earlier in transaction-snapshot mode