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 1wTx2t-000qnd-24 for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Jun 2026 07:26:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wTx2r-009MgQ-1p for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Jun 2026 07:26:45 +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 1wTx2r-009MgI-0x for pgsql-hackers@lists.postgresql.org; Mon, 01 Jun 2026 07:26:45 +0000 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wTx2p-00000000cEO-3M6z for pgsql-hackers@lists.postgresql.org; Mon, 01 Jun 2026 07:26:45 +0000 Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-914bbfc2464so774412085a.1 for ; Mon, 01 Jun 2026 00:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780298802; cv=none; d=google.com; s=arc-20240605; b=OEA0BqTEOSwM98iTyoHYhwjqYGBzdplzG18iMD0cv2TIayQVNptj1SletBTd6QVFkQ /tygiImsUy0ALbDNvxPosXJx6Cd1JaL5zIKotEofBzbymJbky9bAhvU5LDzEvj4DW2yG ozKbYW8oFUJMDh23UxI8JYwkyIsWVEZ/PjfGxp4OoESyPOiDyZahPko71cMvMhiTDavD purGCWOQXG+aqmqp7eCj6JCs5GBk0I9LUSE6i9o0UkOyfwJezvWQVpLPcfgugh+XMAwH U4qoipN3fOS20zhy9DulWMAyBZF0mj9MjQjH2rdoT6c1UcsCr9+gmbcmfq1Jpc3QGj9F ZlmQ== 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=4CEqLioZVmTxDHV+rCBdBE4i7VZ66qwMb2D92dShX1U=; fh=QEl1f86om69ueKQ6eP/no4KVHePnlG1DOxVIddaKj1g=; b=kUNHkUQVUpTLt3Dhr//hVEM1BF1uIgt2qpUBrXcrdAeRYJP6C2FUrhuCwYaJU8rUdN x77ZRz3a7PKVIGn4YhjaJ83W/U3r14eDlOziC00wG7BTvzXKhQq2y001nbztEAFa++gy lmB1VlolFwNsaYSBiyAjumEcwPNpuHFbjyBmhuMjMVCgNSQzXWBkKQLoqTzYVfA1/BIS 8gYqx0fMtgflZM/9y0QgoeZDUmqvGoONPk/+E6w9CCEQadv3xzJSKWSpnGe3TGNiBAbp EAR/Eroq7/rOS4Nw5se61uFc4Ze8hLm/QO8fxhMtMkx1qtjLfBt6hU+/ZS3py38al9cf B19g==; 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=1780298802; x=1780903602; 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=4CEqLioZVmTxDHV+rCBdBE4i7VZ66qwMb2D92dShX1U=; b=COMjAU2fST6xBQk49SiFwGoaZZ4dPQnwvbvCCCsMpMyIyJow2E1KnGtU8wJcJ1RrZJ 8XZtqbpcHEyx9xlV/jUoA4/1Tn3AQDEsSdWg1mebNIcyU2I+Mbv3JxBRtVRK/msuMQ6d fPufmuujm8/RPDz8fLdg4DJAd4BoaeRJdWEMdOmjV5q8c6GW/FT4nasMpAEBiIpcM27m cjE6AN06LgYc7F4+uAi8Qjo2ZKm90+0g1onqXSte1IWFaimFn4GPBVwRei2flANnHREa SORTL28RSxtjr9QMdVmghAx6XYazUoy9sxATxOiD6maq3ThCFU24uYuupkbTxtIRs2dC rHZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780298802; x=1780903602; 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=4CEqLioZVmTxDHV+rCBdBE4i7VZ66qwMb2D92dShX1U=; b=BmuZ0Xy2IudLQQpdL0HhJc+Vf0iPWcgwuaAiP++iasdeuB4A+eSS5E1Clrf0DQy0FA BRf+3PqZjfTdcPrmBeRFp1NCMetNfhXkStAOR8wuWWKZfXmDpBvtyUY6wYEuELcSpxlF BmFH7PBnFAX9kRHAxhqfZgssiu/EZAhMUPXbMbEReTGDWraaxuHHlz74XUYzji/6FN1b r8tI8PXEydvute5tQJlQEpFrCRutQfJh/C7hEn1ms7n42N3qX8O0HDOL0/8ou1ouV7o5 4BbgUffxYYhsF21bA/ZxyBrriE6WmKZSM864pNizpShPl7rJto/6y/56UgHqOkrQ7FpO zp8w== X-Forwarded-Encrypted: i=1; AFNElJ9KqG8sMxM9kV43CYFeeTkOzzezOb0WqHM8MF+7vUbOphkkRco4gJLH43wwSUq0iZ7b3xBHsJn/o7ni0lxo@lists.postgresql.org X-Gm-Message-State: AOJu0Yx/M+hoLp9K4Ijccfv9hkCzTvXJCKiXcp/kcIgYvLFj8X5qjm/L jgts2dh37ty0ZBDMTzpzkE/yVVaBhkvAmDcXqKn1QdUIySnwCWnc3Y/cJMluQWF7Kg+w848OSLH qZtRB4cHGaiG5wmebCNDhJ+Kk/DHtAlE= X-Gm-Gg: Acq92OGH5H3JrhpSuSmIB1KYPraUh+LZf58+OlKlDCvFkx9r3TfywUW3xthb9Uxq/X+ vUGKFgohavYEcPg9vq04VNXDh9qBIUSm9mL2LbdA3BSfdAjAiHqJ0itMZg/PPE77CfaeoKYVs0b XoVupW8myOIhT2f+5ELzFPeeyUIU549fWbMd/oLso20YPaD1wizOswDQ7hgTMGSRlrADrPFx0yP d2ZZbKEgllXZuya0Ar2OuB1V9hVhetE6BnbBYV7jSZ9j35k6vxB22dbVhynfcHdY2HbiRiQ2IX/ UYj/qG94X7BYkVkiJQ== X-Received: by 2002:a05:622a:8416:10b0:516:d83c:edb2 with SMTP id d75a77b69052e-5173a633020mr96682661cf.7.1780298802133; Mon, 01 Jun 2026 00:26:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Peter Smith Date: Mon, 1 Jun 2026 17:26:14 +1000 X-Gm-Features: AVHnY4KFKCzPeLpQ1LjoaYHwMwBlE77JvnOwEGOG0U_d_zpyYRJ20FnnYOSMCXY Message-ID: Subject: Re: Support EXCEPT for TABLES IN SCHEMA publications To: Nisha Moond 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 Hi Nisha. Some review comments for patch v8-0003. =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 but + * 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 EXCE= PT * these ones" is not supported. =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 a= s - > '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) =3D=3D=3D=3D=3D=3D Kind Regards, Peter Smith. Fujitsu Australia