Re: Remove unused for_all_tables field from AlterPublicationStmt

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Remove unused for_all_tables field from AlterPublicationStmt
Date: 2025-09-26 01:24:03
Message-ID: 5448AB45-EDDB-43DE-AB93-54B182E90D7C@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Sep 26, 2025, at 04:47, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo Nagata 2025-09-26 01:29:32 Re: Suggestion to add --continue-client-on-abort option to pgbench
Previous Message Alexandra Wang 2025-09-26 01:20:24 Re: plan shape work