Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wTBNZ-000MtU-2C for pgsql-hackers@arkaria.postgresql.org; Sat, 30 May 2026 04:32:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wTBNY-005Oju-0b for pgsql-hackers@arkaria.postgresql.org; Sat, 30 May 2026 04:32:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wTBNX-005OjT-2X for pgsql-hackers@lists.postgresql.org; Sat, 30 May 2026 04:32:56 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wTBNW-00000000DsC-0ITz for pgsql-hackers@lists.postgresql.org; Sat, 30 May 2026 04:32:55 +0000 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-3965adfd75fso10404241fa.1 for ; Fri, 29 May 2026 21:32:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780115573; cv=none; d=google.com; s=arc-20240605; b=S0odBLFq6Uiy5iRkEUJykCkOMedtPNAM8qjvRCXkuesqKqBjHg8pd3FiC8Bn+IHeFn hqfKdiFuXf9pFUfVWc8wozy2+53AvRpFmKoLjp5jg7QHZHBA4/LP0Gpw+m9RySymcste ZLnZi07bIy8P8zGXxjHbN0IfdaSmIhjHGGlnWmgidJPsic7r+XjRM86DjAUW4oHPmJc0 xOks+qfTF6osMN5ukTzJ8WqwFjr0fsu4M9iGdjK79lDMhnn029ySx6/vlBDPH27EqI0Q McB6FzsozUTwYPx4tadKa7eWP7OGA6QMnBpSxesMhfeOAqgD5ptyzVmZ/1QbvAHsDiQg NPZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=79YqPET6Cw9aK+/xUvwvbhQ2Y4xhWEtxsQhKdh7E4mI=; fh=zI2DYIBe+e/ILwtjZWGnsDa3WpYMe1KyIOminSDXX8w=; b=lqSqOs6HA181A32en9PT9YSC28vDjZc8TTRDLy1v3dynosDLWlWS4R+PKRk2DRgy/b PEmZOhn3qL/s3NxmvefnPhHVazk2MATZzVMoACRjvg8Q1RKLyitBGqyTQE0UzoTIhAzd i0hGmpzG7xFkyxRDcYqwrt0yO4Yf0/eQQoo3p7bi8JuAX8jQTbf5iwMh0cYDcHF2lzA3 tweddII6hT8GvJRVaT7s/cEN5v17Av/3NnLA+0TIZplkkzgts9VmsO9UduQ6/jGaeH1Q y3CGIENvMppBANfxpH4DpxQXFbv8eF1XfdQzQIpoo/9JSGns6Ak4p807wuOPBeLjFLGh 2KNw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780115573; x=1780720373; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=79YqPET6Cw9aK+/xUvwvbhQ2Y4xhWEtxsQhKdh7E4mI=; b=XDMMf5YJbECdDU34wk+ehQTdWwEzu7+FqaxwC665oi/8aRbg5MIYksPLaWD2EV93+C 1f2VC6ov2KQpa45pZ+oksbMPn5Dp+P6YPvQNoEAnOmnBQz49Jwo5qKK1AnWjPjHBr6lz 6rF958ft2J78w42ZgQ5WiEaL1InZVVcY+M+yY1wiD7u5EZc1neF8LRr2URsEb0JRcgtf /5mWDpR6aMA7qBrEzhXTZrCgqknGFZJC3FuQqjkU9nL8PmFmpQU9mmGPKTbpsUthUF3a Ps6diSqr4h+S1DkZnUKx/OWHHOsVaUZ9/JuxJXd8Md0/sJW4Dpvp4c4QAtjEbKqyN0e5 8FsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780115573; x=1780720373; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=79YqPET6Cw9aK+/xUvwvbhQ2Y4xhWEtxsQhKdh7E4mI=; b=gMnt4FBrP2XeGbL7IDmtAwccHMZEoo+I4WkoR2bRsTk/VhWFKgv8fWAWxNOE/TNig1 M2OaaPdTQf42SaTfa8dEp55fhToY7LD9yae52yuwbveJ8sKCC5+D8JWM39Q5sL+eRsUB m+ejXZ3N9KMGaschFj7U/qQI1GRLL0hhzENZTtRtim6a4RxTRz2QFhaluxvA05M5t+dP Hxgh8H4CffZVPzB2WBO/7ucWMFLmUxazgENxK0r3KyRHhP08JX4QH8W4Zk5QRnXqRe8S +GdGBBgEiURNrkKrka8RarA1RSX04T4rCKdyNwuZAhE7rbP+0pephRvrfgn6unmW067e Zh6w== X-Forwarded-Encrypted: i=1; AFNElJ+tNLl0UeUNW0OouaKavzuGYqpq3QURgWhiJrsEF73MOGn9LdX9yu1I77idPFHheR5V/ILpwzY0onH/JdfN@lists.postgresql.org X-Gm-Message-State: AOJu0YwdrgY8P27ffL/RU/xNTuYndWu4j+S8hc2Tnbydjw+KNa5PxG+c 9tG1VeJeHa4w/d4jJIyYSlGBVbmltuBhKjJ2v+VS91ts17929Qp3gUb2pFC9vaIpvk5iqJ0INUr aNsJHDR8gISLyMdYhmMtsp0rLqDogPQ== X-Gm-Gg: Acq92OHEl6aEYmxQb6ZiErjfvKyoUUDl5BKfUUi73PyCeYrE43l6zf9bi9Pi1Yk4IwI KoDQ61ZeLWwlOixuSqrYpAUNPk3DLRKctKRI1flGcG08a+WeDPeklihbvoenBZ3qUoJvMOotAuD s2CYlcyeNudEBnJZQUqTAmFDbW0oUoqDGspYk7kJAnJf8dA52LTR/Z+3kAVMO4z9rBDZu93joS6 BcEI7z9xUkwLuYM4/LjLU1RoTx+7k4nd8+C4+ghtpE+jRfyhTB/3MdNzNTe0JXR2eISPBRiYwOw WeQ52ueOaFjjTGcFIJ/1pEaFevEiFJkk3+HvnTfhGJ9lGFpN X-Received: by 2002:a2e:8803:0:b0:38d:fca1:4a6c with SMTP id 38308e7fff4ca-39664f78163mr3894571fa.17.1780115572667; Fri, 29 May 2026 21:32:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nisha Moond Date: Sat, 30 May 2026 10:02:41 +0530 X-Gm-Features: AVHnY4IrS9geuj554tUveQdspBXjIJXUKe7tvj11tgFho-RRJv_7BeJ24YcMDew Message-ID: Subject: Re: Support EXCEPT for TABLES IN SCHEMA publications To: Peter Smith Cc: shveta malik , Amit Kapila , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, May 29, 2026 at 1:54=E2=80=AFPM Peter Smith = 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. > =3D=3D=3D=3D=3D=3D > src/bin/pg_dump/t/002_pg_dump.pl > > 2. > + 'CREATE PUBLICATION pub12' =3D> { > + create_order =3D> 50, > + create_sql =3D> > + 'CREATE PUBLICATION pub12 FOR TABLES IN SCHEMA dump_test EXCEPT > (TABLE test_table, dump_test.test_second_table);', > + regexp =3D> qr/^ > + \QCREATE PUBLICATION pub12 WITH (publish =3D 'insert, update, delete, > truncate');\E > + /xm, > + like =3D> { %full_runs, section_post_data =3D> 1, }, > + }, > + > + 'ALTER PUBLICATION pub12 ADD TABLES IN SCHEMA dump_test EXCEPT > (TABLE test_table, dump_test.test_second_table)' > + =3D> { > + regexp =3D> qr/^ > + \QALTER PUBLICATION pub12 ADD TABLES IN SCHEMA dump_test EXCEPT > (TABLE ONLY test_table, TABLE ONLY test_second_table);\E > + /xm, > + like =3D> { %full_runs, section_post_data =3D> 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? > =3D=3D=3D=3D=3D=3D > 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=E2=80=99ve now corrected the tests accordingly. -- Thanks, Nisha