Re: Remove unused for_all_tables field from AlterPublicationStmt - Mailing list pgsql-hackers

From Chao Li
Subject Re: Remove unused for_all_tables field from AlterPublicationStmt
Date
Msg-id 5448AB45-EDDB-43DE-AB93-54B182E90D7C@gmail.com
Whole thread Raw
In response to Remove unused for_all_tables field from AlterPublicationStmt  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: Remove unused for_all_tables field from AlterPublicationStmt
Re: Remove unused for_all_tables field from AlterPublicationStmt
List pgsql-hackers


On Sep 26, 2025, at 04:47, Masahiko Sawada <sawada.mshk@gmail.com> wrote:

Hi,

I found that the for_all_table field in the AlterPublicationStmt is
not used at all unless I'm missing something. I've attached the patch
for only master that removes it.


Yep, based on code of gram.y and the doc, FOR ALL TABLE is only supposed by CREATE PUBLICATION.

I agree to remove the field from AlterPublicationStmt, but I think we should retain "Assert(!stmt)”. Because Assert() is a way to detect programming bug. During development and debug builds, it prints a diagnostic message which is helpful for identifying bugs. Without the Assert(!stmt), it will just silently discard the bug by “if (stmt)” in case that stmt happens to be NULL.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/




pgsql-hackers by date:

Previous
From: Alexandra Wang
Date:
Subject: Re: plan shape work
Next
From: Yugo Nagata
Date:
Subject: Re: Suggestion to add --continue-client-on-abort option to pgbench