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 1w0jBW-0029tX-0h for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Mar 2026 16:46:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w0jBT-00FsqF-0U for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Mar 2026 16:46:51 +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 1w0jBS-00Fsq6-27 for pgsql-hackers@lists.postgresql.org; Thu, 12 Mar 2026 16:46:51 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w0jBQ-00000001nRx-3tLe for pgsql-hackers@lists.postgresql.org; Thu, 12 Mar 2026 16:46:50 +0000 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-5a1443780c4so2608048e87.0 for ; Thu, 12 Mar 2026 09:46:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773334006; cv=none; d=google.com; s=arc-20240605; b=N+4l6yRgaZHXQ1nQgQR+oIkLaxFcvAjyJYmMH2WRuhu4zMTlnSLeuemUX0hpivfilY on8JKoiZw/sEzkjWFIdR2neJipadNkCAvuqabHwO2AeEWBCqbVD7Nj84OLnHH+suZ3fj guDKoNE3D99wNHjCmP58P/1/PMNZGlIcgbxT3EGvd+96OfnYjuMhpw3LPTsmWuLpP6ka r3GVbVsdqVUa6lZNixz4TEokd/T+6be1bMlSWe3CJ01Avy8yqFqwYTx3i5E8x3wokv3D DOPwbUZMKUCmRSTTthdi58eycq1WEWvoX4r5Na1Er5KvJ3cZQpEVPihy4pNO1VTHXHDP w9NQ== 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=h0TjHJIrjThc178eavYpc7osvZO117gG2iSYNM88r7k=; fh=w9QhbU2XWVPqFbPHMmAOEHSFKHSShDvMk21MHJpIEio=; b=cA3CVFqexIeVjR0sn2S4yj0wY9McDoVe9oz4ra/cdXAiCoeXq+F+sX+7pk78hAdlkN 95rBtbsQIgsIkFVlj5vYKIvQe1rLj/2KNQyDt2H7je0uJOKzfptDo4L75JT0JjfroDum enYc8mVmqlEPZn7OGy66cU6EQXlMiEEIiZbaH8emiANo89o9IX+6dLd6FFVYS+M/YxuM Q62OrfJVMY7vLJ7EEhVKTHDnzGrHkrfOSbGdzkSK7kuBqk3hT3K78TY8dyskrrgRkMRX amXUVZqc2jwb2Lp8lKrwiM/2WnAq3ZQtMHRAUybhA3HGjVzcUlUHTLtJyrwbIPNeGNs/ mqQg==; 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=20230601; t=1773334006; x=1773938806; 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=h0TjHJIrjThc178eavYpc7osvZO117gG2iSYNM88r7k=; b=FR/yv83swnKWjPkj91+Z4OzrzJ1q5BAPAnAnGfx0lJhimk9qqQPu8SS0UThVswsWf6 N+hceI4kvsApbljq9UWmmzrAwjCGA8DXMFtwE9CqqcpfocUf/3DdPhqoK2Z7OfcPYMzN 784MdfR45t2xZ6CtwDbAPEcnLo8IBPvJrgHqPOloJRPOT2Jz8cndC6vntXgefaFxDD5O wjw9bbzsg3rphgRnYg19DryjenAlqFr4DTSD8YJY8SlIiaN6psUhD+ZSouEGq9pKR4rF S2w4U3bor4q8niIyYf/B+1qUu4CSZpaIqg7aOAQVdvKWI2MhK42/ESo2OBjsCAmNN4OT ohmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773334006; x=1773938806; 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=h0TjHJIrjThc178eavYpc7osvZO117gG2iSYNM88r7k=; b=C8t2gLz3xxRjkqdxRUuNrXGO/VFrQqGSbbgiE5CqfBGCso5ifkhfAwFJxlp9Xx24AI 6IZKw39VdltM3vj7X6jyDAPPguo8qHlo9QybgWdn6WTXIFyWgYua0BtOkcAp8lBzEzHQ fTOxxoVVJXOheUt9UyAFBHeQx5mKh2vjeXwdELhAwr/ArCJeQFLuAiCMP39VZ65aV2Gm MXeJhR9dEHQAfI08S5atbOyPgpEtOyiGL0VBbyK7BXBdsMyXwkrW5gvdeQ84NAj2MLLe 4kgVyfJiqui907fl1meObpMT3k1xz3XCnpT+FqaYv0TU/S2UM0jfoJf4QX4zrl7X0euI DYBQ== X-Forwarded-Encrypted: i=1; AJvYcCWDY+wZrG4zbPLvrocxKVRZMH53yQgLLq873MrbYS24LWMentFiyzOEocbstlZ37oy6I0VwP90V8av7Z3Tg@lists.postgresql.org X-Gm-Message-State: AOJu0Yy4bLeQF0aogz/lTGxXiUMFrBxX5Q11Jmt9ateacHtaDvMHN9Bo 9LZbMB4Mt8rK4bdbwuB3K+Qyw788v9tbTI65ipl/7p3anR0bmgVhvk10PDvdI5ef+VCkKM6qTrC 7MzKe04ZOc7k2vKxyser/usQjTtmSdz8= X-Gm-Gg: ATEYQzz2zpW1Uimv/PHVOCSSUajOS4Wsm7TZ5U+jgSh2AV0XypW8apDurujDlWWxao5 qQbrquvyTe59+TmXVRc5nEqo48gD1NpB41fDVnn9KiE+DS3iU3eyNf8lST9NksvhAsBfHho45nA ZCwHn6V98jncjqws7A+yRztWF9+Th0WQKjGMuGrdh1AxAHmdS9B8bvuaQJfj8mhAGyB7YiW14Ti iRnkIQPDoY88Y+wqzsJkG5rTxPJCMZUDgcsDIs8Zma3CMPAYTDEeqqg6GZa3cbxGR0mdtv1NcBz dj2NirDx X-Received: by 2002:a05:6512:3255:b0:5a1:33f8:d55f with SMTP id 2adb3069b0e04-5a16267be7amr85788e87.23.1773334005546; Thu, 12 Mar 2026 09:46:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Masahiko Sawada Date: Thu, 12 Mar 2026 09:46:09 -0700 X-Gm-Features: AaiRm53hMXCvkLCk6mtUu16P5ikv6TKglCdIIi01y492vUbPD4GLNRm7KD2W6F0 Message-ID: Subject: Re: Skipping schema changes in publication To: "Hayato Kuroda (Fujitsu)" Cc: shveta malik , Amit Kapila , vignesh C , Shlok Kyal , Nisha Moond , Ashutosh Sharma , "David G. Johnston" , Dilip Kumar , Peter Smith , "Zhijie Hou (Fujitsu)" , YeXiu <1518981153@qq.com>, Ian Lawrence Barwick , Bharath Rupireddy , 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 Thu, Mar 12, 2026 at 4:50=E2=80=AFAM Hayato Kuroda (Fujitsu) wrote: > > Dear Sawada-san, > > > I'm still unsure that the syntax like TABLE (t1, t2) for the exclusion > > list is syntactically correct. The syntax of TABLE (...) is already > > used in a quite different way as follows (borrowed an example from > > stats_import.sql): > > > > CREATE FUNCTION stats_import.pg_statistic_get_difference(a text, b text= ) > > RETURNS TABLE (relname text, stats stats_import.pg_statistic_flat_t) > > BEGIN ATOMIC > > WITH aset AS (SELECT * FROM stats_import.pg_statistic_flat(a)), > > bset AS (SELECT * FROM stats_import.pg_statistic_flat(b)) > > SELECT a AS relname, a_minus_b::stats_import.pg_statistic_flat_t > > FROM (TABLE aset EXCEPT TABLE bset) AS a_minus_b > > UNION ALL > > SELECT b AS relname, b_minus_a::stats_import.pg_statistic_flat_t > > FROM (TABLE bset EXCEPT TABLE aset) AS b_minus_a; > > END; > > > > Wouldn't it be more appropriate to use a plural form or the IN > > keyword, such as EXCEPT TABLES (t1, t2) or EXCEPT TABLES IN (t1, t2)? > > But there is an existing syntax to list target tables, FOR TABLE t1, t2, = t3..., > which does not have the plural. Current rule is to use the singular for > specifying the exact table, and we follow. "TABLE t1, t2, t3" and "TABLE (t1, t2, t3)" are different to me since the latter reminds me of TABLE (...) syntax for defining a returning table. > > Or if we might want to add multiple items in the EXCEPT clause in the > > future we can have parentheses around all exclusion items as follow: > > > > CREATE PUBLICATION pub FOR ALL TABLES EXCEPT (TABLE t1, TABLE t2, > > TABLES IN SCHEMA s1); > > CREATE PUBLICATION pub FOR TABLES IN SCHEMA s1 EXCEPT (TABLE t1, > > TABLE > > t2), TABLE t3; > > I agree those alternatives could work, but one downside is the redundant = use of > "TABLE" when many tables are excluded. If we want to stay consistent with= the > existing style, perhaps we could write it as: > > ``` > CREATE PUBLICATION pub FOR ALL TABLES EXCPET (TABLE t1, t2, t3); > ``` > > Because we have already been accepting the syntax like "FOR TABLE t1, t2,= t3". > Yeah, we can omit the TABLE keyword for the second and subsequent tables. My whole point is that using different syntaxes for the inclusion list and the exclusion list would quite confuse users. Regards, --=20 Masahiko Sawada Amazon Web Services: https://aws.amazon.com