On Thu, 17 Sept 2026 at 15:25, Zhijie Hou (Fujitsu) <[email protected]> wrote: > > Hi, > > On Thursday, September 17, 2026 2:11 PM Amit Kapila <[email protected]> > 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
v3-0001-Don-t-quote-the-relation-name-twice-in-EXCEPT-cla.patch
Description: Binary data
