| From: | Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> |
|---|---|
| To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
| Cc: | shveta malik <shveta(dot)malik(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Support EXCEPT for TABLES IN SCHEMA publications |
| Date: | 2026-05-30 04:32:41 |
| Message-ID: | CABdArM7EuqsU_X=CpvM6Lx2AMmX6nPiHxKSZNYH2qgBTVE8-PA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, May 29, 2026 at 1:54 PM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> Hi Nisha.
>
> Some review comments for patch v7-0002.
>
Thanks for the review. All comments are addressed in v8. Please find
responses below for a few of the comments.
> ======
> src/bin/pg_dump/t/002_pg_dump.pl
>
> 2.
> + 'CREATE PUBLICATION pub12' => {
> + create_order => 50,
> + create_sql =>
> + 'CREATE PUBLICATION pub12 FOR TABLES IN SCHEMA dump_test EXCEPT
> (TABLE test_table, dump_test.test_second_table);',
> + regexp => qr/^
> + \QCREATE PUBLICATION pub12 WITH (publish = 'insert, update, delete,
> truncate');\E
> + /xm,
> + like => { %full_runs, section_post_data => 1, },
> + },
> +
> + 'ALTER PUBLICATION pub12 ADD TABLES IN SCHEMA dump_test EXCEPT
> (TABLE test_table, dump_test.test_second_table)'
> + => {
> + regexp => qr/^
> + \QALTER PUBLICATION pub12 ADD TABLES IN SCHEMA dump_test EXCEPT
> (TABLE ONLY test_table, TABLE ONLY test_second_table);\E
> + /xm,
> + like => { %full_runs, section_post_data => 1, },
> + },
>
> I found those hard to read at first. How about just changing the test
> title of the ALTER parts
>
> BEFORE
> + 'ALTER PUBLICATION pub12 ADD TABLES IN SCHEMA dump_test EXCEPT
> (TABLE test_table, dump_test.test_second_table)'
> SUGGESTION
> + 'CREATE PUBLICATION pub12 test continues ...'
>
> (2 places like this)
>
I don't see any existing "..test continues..." pattern, so I changed it as -
'CREATE PUBLICATION pub11 - ADD TABLES IN SCHEMA EXCEPT dump'
Thoughts?
> ======
> src/test/regress/expected/publication.out
>
> 3.
> +-- DROP TABLES IN SCHEMA also removes associated EXCEPT entries
> +ALTER PUBLICATION testpub_alter_except DROP TABLES IN SCHEMA pub_test;
> +\dRp+ testpub_alter_except
> + Publication
> testpub_alter_except
> + Owner | All tables | All sequences | Inserts |
> Updates | Deletes | Truncates | Generated columns | Via root |
> Description
> +--------------------------+------------+---------------+---------+---------+---------+-----------+-------------------+----------+-------------
> + regress_publication_user | f | f | t | t
> | t | t | none | f |
> +Except tables:
> + "pub_test.testpub_tbl_s1"
> +
>
> Isn't this showing a BUG, because after the DROP the "Except tables"
> are still listed.
>
DROP handling is part of Patch-0003, so the DROP-related tests belong
there. I had added the test here only to verify the ADD scenarios, but
I agree that it makes the coverage confusing and incorrect in its
current placement.
I’ve now corrected the tests accordingly.
--
Thanks,
Nisha
| From | Date | Subject | |
|---|---|---|---|
| Next Message | zengman | 2026-05-30 04:38:02 | Copy-paste error in hash_record_extended() — args[1].isnull not set |
| Previous Message | Nisha Moond | 2026-05-30 04:32:23 | Re: Support EXCEPT for TABLES IN SCHEMA publications |