On Thu, Mar 5, 2026 at 3:05 PM vignesh C <[email protected]> wrote:
>
>
> Here is the rebased patch for the remaining items in the patch series.
>
Thanks. Please find a few comments for 001:
1)
alter_publication.sgml:
The SET clause will replace the list of except tables/tables/schemas
in the publication with the specified list
The order is difficult to read. Would it be better to say it in this
order: tables/schemas/except-tables
2)
postgres=# ALTER TABLE tab_top_root ATTACH PARTITION tab_root FOR
VALUES FROM (0) TO (2000);
ERROR: cannot attach table "tab_root" as partition because it is
referenced in publications "pub1", "pub3" EXCEPT clause
DETAIL: The publication EXCEPT clause cannot contain tables that are
partitions.
HINT: Modify the publication's EXCEPT clause using ALTER PUBLICATION
... SET EXCEPT TABLE or DROP EXCEPT TABLE before attaching the table.
Shall we shorten the HINT slightly? Is it necessary to explicitly say
"before attaching the table", or can we omit it? Thoughts?
3)
+ if (has_except_table)
+ ereport(ERROR,
+ errcode(ERRCODE_SYNTAX_ERROR),
+ errmsg("EXCEPT TABLE clause allowed only for ALL TABLES PUBLICATION"));
+
In what scenario will we hit it? I could not find one.
4)
-- fail - can't add an EXCEPT TABLE to 'FOR TABLE' publication
ALTER PUBLICATION testpub_fortable ADD EXCEPT TABLE (testpub_tbl1);
ERROR: EXCEPT TABLE clause allowed only for SET clause
Even though the comment says that it is a test for not allowing EXCEPT
TABLE for 'FOR TABLE' (perhaps trying to hit the error in comment 3),
it ultimately hits another error that EXCEPT is not supported with
'ADD'. I think the error in comment-3 is unreachable. Or let me know
if otherwise.
We need to correct the comment here.
5)
-- fail - can't drop an EXCEPT TABLE from 'FOR TABLE' publication
ALTER PUBLICATION testpub_fortable DROP EXCEPT TABLE (testpub_tbl1);
ERROR: EXCEPT TABLE clause allowed only for SET clause
Same is valid for this, comment (i.e. the intent) and error does not match.
~~
Please check other test-cases too for intent and error. There are many
like above.
thanks
Shveta