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 1w0AC1-001ff4-2F for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Mar 2026 03:25:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w0ABz-007IZi-0K for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Mar 2026 03:25:03 +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 1w0ABy-007IZa-2N for pgsql-hackers@lists.postgresql.org; Wed, 11 Mar 2026 03:25:03 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w0ABw-000000024T3-0rI1 for pgsql-hackers@lists.postgresql.org; Wed, 11 Mar 2026 03:25:02 +0000 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-2ae8979dbb2so28652005ad.3 for ; Tue, 10 Mar 2026 20:24:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773199498; cv=none; d=google.com; s=arc-20240605; b=hMKdpXKgFBJV55SzhVXjL0kKqV33jO64k1U0uf0VRrFVo599AiHU1Z+JcauoIMP3X6 /+/WGQsHIflJ2wOeKMz6ooqsdbs4Ji//KAvSfZlPYQCBcabbUlI8uBFNTsi8HjExtYZx FvvJPdu1oUlOBC9rqtUaRTjuYStr56iXm+uy2OCMYYMXP08TJh+LGIei7a8rvkBzm4iS /kPqPi3SKD9AP5FPedCIY098CmKSI2fp1jy40NDGnlQyfMMLHw6DN7mmtBSH/qtheHWG B1rE0nn1yxCdJuRF3fVT3sqhq3kebkisFORo3nip7eFvKMFVbJxCOkESMTe/RpzM70eT F68w== 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=ZwC6O1BY6QfyH8wTmsvPAy50pu24Od3aVYjssmwZc/Y=; fh=lTgloA3FuLL2LfNHKRUikKvCn4gHb5dXbOGQbm3gfpc=; b=BDm3U8vxcksL8He9m64XDrenaAYZCIQU44n7G6vVCLTHMwlbYstME/pYALI5cZtwPM U1MQEjfUghadnMkTDjfb/zKABy30ztnaZYitMDqCVW3LpEyYI/r900rU26cuniiBSQFP VXwyvLfBLnRXAaRgvDSrnMneXlKpMF9CjCTjy9jkRUaAYNXw4pJJg2+27Z90Ef7aGFYg JyIuFwUv8rZQY9/9SAX98TpIKkvnR5tVNCP6zs2aV0RaKlKS2ndG/izsetrYc6eaQxVs werfBNvh0Hy9f25iV152D0ezgxXXbfhYX69BIz9V96K8SQIj1c5gs05QqTLKeruLHkC6 n9iQ==; 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=1773199498; x=1773804298; 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=ZwC6O1BY6QfyH8wTmsvPAy50pu24Od3aVYjssmwZc/Y=; b=joBBAH0JPNV20OvQ14d26QzVU8bVKB/CQG67Dm2MVvUY1G5kd/aBByHD1XcnZu2uRv DExe6muRJQc7P2o7B7LFgiRRNBZrF6HQA8alvyCy4/Q3reGD8/xfcm3geEGADpaMQ4de 6b7K+h8X4IeNkKuy4EZMc0Vpm6xtFP7GXR12hjzahKve6XnE6mdbgawR+UcV7+hRivVd RFUlAu880Ad2i1Uxk9snn3ZgsgKtre7YnIJksIaOYOFGW3FaKiYk1UB+8C3IYXr2qjFa 0MM1VY+Qnb4Q25KRtdj2XDFhnhLRtYBNUo8ge/LrcURc3mnaM45amZcWxF4JAy69r0tX djNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773199498; x=1773804298; 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=ZwC6O1BY6QfyH8wTmsvPAy50pu24Od3aVYjssmwZc/Y=; b=cGn7Kh94iyFj5iw+UeWl4gkX8cJaPTq8aoGnatM1apw7bIIf2pZJbPepJ/vzEMv8ab KP4xX+/1wfo3Cu7hqvYBCL2YvWsPVKJvnFlHyrZu3FQOA8svXWmLPGsFmsMJfR5tBMQv LlT6mvCwN0+IbvXfUJhNlk/HLWGpB4oeFT9Q9vlFRytVR8Re9QPxFtzfm5kK21pgXBPx UR2VA9AZYBhxGu/heyjW3G/pUcamCN9TN5YsbU06CgN1rukKvomJKd5EoSEGevEttuTt Mf7nupMmwx3mdKJzhxXmAji77gsrDNUOcfZ9aFZJsMNrEH67oRWTmQPiBUbINXBM4za1 NkCw== X-Forwarded-Encrypted: i=1; AJvYcCW5Ean30aCCnkspJyLUH7w2EEnoakIwRpgvJwEH1D1hjKQs4eVVPd+S1rNnsSDNPjnEAQy9IA9Z9Uyh/B20@lists.postgresql.org X-Gm-Message-State: AOJu0YyMnXthTRphsI86WUkxoEV2xAlANjkyRTDcLaCfMHwPeKv4bi0S bmyDEZKqNoNLyAmNJ7SqF0YYtZKrca4u3bGc2FzO0z6fqtOz9C9iY1PPb/ArV3qdcgKLm0DmriR oK9wWpbs2WsxfIQqTysxFrW12n+E2z/Y= X-Gm-Gg: ATEYQzyTVzt9ziTQdcPtiyEYzpVaWJu+QwZfZQchJkHaM/WBMuTzXBjZ5QT9E477ZPJ y3Rbb8t9ld19UD9dU0vP65Ge2ePwn2R+TdzL7rUlRGUpxdhyhmLo6JzO4QbNpgAXQaIS+jDdtOD pPQh3JmBQTFGklVlBoiQWzn4/fDLyfIMz2i+KjdpnluUhwwidl4gQod5NcHCHCwpJnleJ+HGUTZ WNIDszcKZROaGlVXJ9QpFoEDPTRBxEWu6LyflL09nHUu+fgFbJjjYGn5gt0ib6NSWOxUaGWCpsg vAvDJHLz/8OZu4zfryCfsggyi3XE4rH8umMQ+yPUdGIi6vFkOOuDGsJIQj5PNxPL X-Received: by 2002:a17:902:e784:b0:2aa:e387:b83b with SMTP id d9443c01a7336-2aeae9042ccmr11360255ad.43.1773199498064; Tue, 10 Mar 2026 20:24:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Wed, 11 Mar 2026 08:54:46 +0530 X-Gm-Features: AaiRm50ptsa1Mg5shxRnPlFZ6MNsh-akZvJTlWrSeftSIZMuR_WDZnCs7kxySFE Message-ID: Subject: Re: Skipping schema changes in publication To: Masahiko Sawada Cc: 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 , shveta malik 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 Wed, Mar 11, 2026 at 2:25=E2=80=AFAM Masahiko Sawada wrote: > > On Wed, Mar 4, 2026 at 3:01=E2=80=AFAM Amit Kapila wrote: > > > > On Wed, Mar 4, 2026 at 2:49=E2=80=AFPM shveta malik wrote: > > > > > > On Wed, Mar 4, 2026 at 1:54=E2=80=AFPM vignesh C wrote: > > > > > > > > Here is an updated version with a couple of typos fixed and separat= ed > > > > the describe table query based on versions which make it more easie= r > > > > to read. > > > > > > > > > > v56 LGTM. > > > > > > > Pushed. > > Sorry for joining the discussion late. > > I've tried with the new EXCEPT clause and I have some questions about > the newly introduced syntax. With this feature, we can now write: > > CREATE PUBLICATION pub FOR ALL TABLES EXCEPT TABLE (a, b, c); > > The exclusion table list is written in the form of TABLE (a, b, c) but > it's quite different from the inclusion table list we can specify > (e.g., TABLE a, TABLE b, TABLE c). I'm concerned that it could confuse > users. Have these points already been discussed? Also, isn't the TABLE > after EXCEPT redundant? > Thanks for the question. Yes, these concerns were discussed earlier when the EXCEPT syntax was introduced. The current syntax: CREATE PUBLICATION pub FOR ALL TABLES EXCEPT TABLE (a, b, c); was chosen intentionally, mainly for extensibility and to avoid ambiguity in future enhancements. 1. TABLE keyword after EXCEPT At first glance, the TABLE keyword might appear redundant. However, it becomes important if we later extend the syntax to allow excluding other object types, such as schemas or sequences. For example: CREATE PUBLICATION pub FOR ALL TABLES EXCEPT SCHEMA (s1, s2), EXCEPT TABLE (t1, t2); or potentially more complex combinations such as: CREATE PUBLICATION pub FOR TABLES, SEQUENCES IN SCHEMA sch1 EXCEPT TABLE (t1), EXCEPT SEQUENCE (s1); In such cases, explicitly specifying TABLE (or SCHEMA, SEQUENCE, etc.) after EXCEPT avoids ambiguity and keeps the syntax consistent. 2. Parentheses around the exclusion list Parentheses are required to clearly separate the excluded objects from other elements in the publication definition, especially when mixed with inclusion clauses. For example, consider a future case like: CREATE PUBLICATION pub FOR TABLES IN SCHEMA s1 EXCEPT TABLE (t1, t2), TABLE t3; Here it is clear that t1 and t2 are excluded, while t3 is explicitly included. Without parentheses, a statement like: CREATE PUBLICATION pub FOR TABLES IN SCHEMA s1 EXCEPT TABLE t1, t2, TABLE t3; would be harder to interpret and potentially ambiguous. So although the syntax differs slightly from the existing inclusion list (e.g., TABLE a, b), requiring both the TABLE keyword and parentheses after EXCEPT helps keep the grammar unambiguous and makes the syntax easier to extend in the future. Original discussion is at [1]. [1]: https://www.postgresql.org/message-id/CAJpy0uB%3DJxTYXOB7VmrhVLR%2B1PG= 0%3DTtHuGekaqibOPpo2UBLiQ%40mail.gmail.com thanks Shveta