Fix new pg_publication_tables query.
authorTom Lane <[email protected]>
Tue, 6 Sep 2022 22:00:32 +0000 (18:00 -0400)
committerTom Lane <[email protected]>
Tue, 6 Sep 2022 22:00:32 +0000 (18:00 -0400)
commit20b6847176976da9cae6103475b967e6c2971898
treec0a92c69263428af839fbc63c4f13e4371601795
parentcec2754fbebee0a40aaf905947deb823cca4fe39
Fix new pg_publication_tables query.

The addition of published column names forgot to filter on attisdropped,
leading to cases where you could see "........pg.dropped.1........"
or the like as a reportedly-published column.

While we're here, rewrite the new subquery to get a more efficient plan
for it.

Hou Zhijie, per report from Jaime Casanova.  Back-patch to v15 where
the bug was introduced.  (Sadly, this means we need a post-beta4
catversion bump before beta4 has even hit the streets.  I see no
good alternative though.)

Discussion: https://postgr.es/m/Yxa1SU4nH2HfN3/i@ahch-to
src/backend/catalog/system_views.sql
src/include/catalog/catversion.h
src/test/regress/expected/rules.out