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 1wUKvq-0015kA-1U for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jun 2026 08:57:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wUKvp-00DiW2-1L for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jun 2026 08:57:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wUKvp-00DiVu-0L for pgsql-hackers@lists.postgresql.org; Tue, 02 Jun 2026 08:57:05 +0000 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wUKvn-00000000pEJ-0dgZ for pgsql-hackers@lists.postgresql.org; Tue, 02 Jun 2026 08:57:04 +0000 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-3967724bed1so27670211fa.1 for ; Tue, 02 Jun 2026 01:57:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780390622; cv=none; d=google.com; s=arc-20240605; b=OBEohFy/gXk4voAUvBEodrn6LJCk2gdQ14O3LPUl+ECmBBpc22WBY6ckFvRJUUeVXM V9SZrriW/wN6pmJGJPWUqzQpPc3Ht+MNagroy2IXUM8AuUtFpMtfWNfCgKcSlcEbAYhL f7JlCcvaQGxGguuk77S2FwL26Ii7mol4Ylgktc8cMoPHdU72FVhAK8RpY2vmUVRHBH+I nUtxOy9olxMPqOxectVCj6f7to36dpTidn3r8rHGmjC+UWAzT7r8UtsAUJYqoq1rN7W4 JZhoQYpbNLRSlfAn2rPNEKuEKPGy1/tinwW0cGr1dCE+xdKSmE9rIBGiNWTHOKp5RhKY LX9A== 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=2F9HF73qZApSAlGcFnVdt9Mg4+TpWNsMQ32lxxfXksc=; fh=mBcRO5VnBRMW0c80xt3VDAB4Hd4nl55kn5WJ/9MA52g=; b=YdYWWm8cohHIvOyM85Xil/AazjkZB59UOs4PUK27kZtHVvjsRBGcZbpcN3fR+JH7nE bt4XxCsXXcAWFmSN08ZviwgsSArULp0omOFqYTaubvqywsVYvjttx0zUbmNjpEGd11i1 ICywoTO5Ac4J/O1/LAODERfsTx5bxXo2VxV/LdYO84iks7bl3m6unFpOwrnfpWxuGkOB gHehhLo4zy777qkfmu4TLNtcus4d00U1Dw52NuMcTt/GR2XACNM30g648Ozhn/1PF3Ux BAw8gN725uybS5vViSrT7Y0ipSfxBJ/Jz56Hge+ylWfiOoP1LHZya2k5AopIv3l1h9Fq 1GWg==; 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=1780390622; x=1780995422; 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=2F9HF73qZApSAlGcFnVdt9Mg4+TpWNsMQ32lxxfXksc=; b=asJXIvSBh09xXdOfbK/2I3DP47H8qlTx00REEu7rqqTsWHmFA7RKfz+XqMjclOv673 8gOrpmFyb4VHrmDjAIeH6K4FpZpw78szj7e4+xR/h/uPIW17p3DfRv/3HaiGbyDIgwaS D+CYV/VEWxMNaILI61y1AqXzllYwouhdm+HJfGTxXOoCGjpDdLnem9zdfffVl62LuZ6v ARR++Vn8iivPz5/MVRF70w597Z/MAkUxmiIn/lXeiHs6h86ATIeDN/kJPfFUTX5dSQhV ojCAP2y4AaCL85cd7EqgMyv6UuAO31TELAraFPXknwB5B+HSWsSHmrbfeTFihV3SCiuq 8hzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780390622; x=1780995422; 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=2F9HF73qZApSAlGcFnVdt9Mg4+TpWNsMQ32lxxfXksc=; b=bd98UHsPNCAip7KA5GL89/JQbVaugTQ/ttHd2tqqsIcG3cdOBehof47p+heWMDGHjZ L90jgdkHr2DzyrVwBYuJkbBI/JiNBQn/tr6TwH4+mJt5xnfAxnAh9uY71usv5v8N+QdM Y5AcIeDbRnzYgGexN8nJaH3+7eb59wsmrjLZsuvPPjVUC1UOV+EAkCbzWb/SoFkTdN4C xdrd0pGFtevDz80ELT4RDn5rcTwwrYaoErlCXnl3HZSQVEAtkk3yAVhcQzIuzxC2U9Lb fje45CUTjd6KwNrWtcuM3CfyRUs5H9+mrFvitBcAiruH3hsDw5dJvAb4KNTuj4b2R3SK J4bw== X-Forwarded-Encrypted: i=1; AFNElJ/ypIPwZKnFLCFMYEZiN/GEaJyectB/8GPuFW5itWqobX33pRKEK2zfO7ag+NaB7lISP0X/CfbzcJRsqgza@lists.postgresql.org X-Gm-Message-State: AOJu0YzkMxzI7PX5Vtq7jX7NkAVuViKGTXER8WHAAIM4v1Cdex+CCfvo SEmcbxPYxEFvEY9SkDSgZ+gnALfisQogd2hoHqYPmwqlKxYODnQf/wqXRJ/aDvyjLuqwOptAKl2 Al+t17/yj9VcwJRhR57qor3irBqEG8SQ4CWCXmw== X-Gm-Gg: Acq92OHOYdF6hhH4uxfgkf0vFSLnsxjG+uYweAp4OqaUFKd42f43QnmpYIcJLMGI+jW Eknp+Kfl5/xG48ZjY9aGFVgww68xYb7w2YSoE4CA2JDeBgxjVnCn8/DJRUbWRoIREGhKNmlGv2V q1RskGHv8aEYRIXjwFyS1ELFI+Pc1Oe3IaRy7wc+fbnn2qcj6gQzuF2Bd+qBBSw2iwKGZXzibyD MBi0TzFfFwxghMTlxr0gxP8miKF9w95St90lBoNAIwuZvLBKKoGuWBJDh69jWQ18NjTzgLbTkzo JhxHRnXwmWjO3ajVBcmXKasJDbhZpVoDDJuDL2wD4fE7x7Ig X-Received: by 2002:a2e:be86:0:b0:396:95eb:160e with SMTP id 38308e7fff4ca-39695eb2188mr15622881fa.23.1780390621923; Tue, 02 Jun 2026 01:57:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nisha Moond Date: Tue, 2 Jun 2026 14:26:49 +0530 X-Gm-Features: AVHnY4LFwoo8o6B8wxRMw9TZ4pPDZmF-HVC3kGyw6UK0q_rx4T69noVv786AGxc 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 Mon, Jun 1, 2026 at 12:56=E2=80=AFPM Peter Smith = wrote: > > Hi Nisha. > > Some review comments for patch v8-0003. > Thanks for the > =3D=3D=3D=3D=3D=3D > src/backend/commands/publicationcmds.c > > AlterPublicationSchemaExceptTables: > > 1. > + /* > + * EXCEPT is not meaningful with DROP: dropping a schema from a > + * publication already removes all its except entries via cascade, and > + * there is no sensible interpretation of "drop only the except entry bu= t > + * keep the schema". > + */ > > Is that backwards? I think you mean : > > SUGGESTION > * Dropping a schema from a publication removes all its EXCEPT entries via > * cascade. The concept of "drop all schema tables from the publication EX= CEPT > * these ones" is not supported. Fixed as suggested in v9. > =3D=3D=3D=3D=3D=3D > src/bin/pg_dump/t/002_pg_dump.pl > > 2. > On Sat, May 30, 2026 at 2:32=E2=80=AFPM Nisha Moond wrote: > ... > > I don't see any existing "..test continues..." pattern, so I changed it= as - > > 'CREATE PUBLICATION pub11 - ADD TABLES IN SCHEMA EXCEPT dump' > > > > Thoughts? > > I've since found that there is a way to combine multiple regex within > a single test. Doing it like below is a cleaner way to write these > multi-statement tests. > > SUGGESTION (note /xms instead of /xm) > 'CREATE PUBLICATION pub11' =3D> { > create_order =3D> 50, > create_sql =3D> > 'CREATE PUBLICATION pub11 FOR TABLES IN SCHEMA dump_test > EXCEPT (TABLE test_table);', > regexp =3D> qr/^ > \QCREATE PUBLICATION pub11 WITH (publish =3D 'insert, > update, delete, truncate');\E > .*? > \QALTER PUBLICATION pub11 ADD TABLES IN SCHEMA dump_test > EXCEPT (TABLE ONLY test_table);\E > /xms, > like =3D> { %full_runs, section_post_data =3D> 1, }, > }, > > (ditto for the pub12 test) > Thanks for the suggestion. I've updated the test accordingly in v9. -- Thanks, Nisha