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 1viSX5-006shg-0N for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jan 2026 07:21:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1viSX3-005QU5-2o for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jan 2026 07:21:38 +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 1viSX3-005QTx-1i for pgsql-hackers@lists.postgresql.org; Wed, 21 Jan 2026 07:21:37 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1viSX1-001fxC-24 for pgsql-hackers@lists.postgresql.org; Wed, 21 Jan 2026 07:21:37 +0000 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-385b5174f54so1652751fa.3 for ; Tue, 20 Jan 2026 23:21:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1768980093; cv=none; d=google.com; s=arc-20240605; b=GS2RCBnuCdkpV1xpE8CFi2Og8YMaxUkf1lxh9yJ9oVk+o27jPkUNKrwm28LwLy2zxF HVMsJ3AGJMtoKrvyTQiK1R6Hn/D+sNIRgQ/bwEugm0fc/8evLuEEwnXMQ342q1wREfn9 lgQ7ln6BWUzQ//E/7BAXac7rHxblkVjefJfZvKcaivYHF3Kf0jZt4z7aExOPjaXLgY09 avXW4pSGN3FxsySGcRrtjztrihzr2jmxiqC5fByIUL3LCCShww/Y2uVhFQaXFExJSKah YOs03chH9O4T1Q0gaih1G/qtLWCY+BSTKuYAhk1CN5ORFa9NZ3haBiSoF+asQHb79WAI +lOA== 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=U+/BmbS7O+j/0VSGODq8vN1tk7UlSU05tmyaOFwRICM=; fh=3rJDxgR1aoOUQ1TPeeiiXsS+82o6aMt8wyie/7HR408=; b=OIOPFqa2Ity7egPYTSZTEya1Jcoo7od93+M7SUEi/T8KqsaSdZKjqpEHaDoRR5IfA3 BrVQxLWuqZAke+Czw1SuJ8771G8N5uQN2KtzySN0bdA35hwctB02SREwbZUkQKjwo0UC 63Xqxqg8S++j9HSQTT3t8TKrVrS1/oJ7jrZPcEQ+cEJnIgJAVV6Jfqr5ZkYVlSz+76l/ 1AtDZore1ZWzrzWhzxL7nRWveavmwyRYBnDu4RqFQwwoaVDyDCLiq7P2vdCMoQbK1CEV Wn6p179byVJaIr3MorS8w56nhsQK/Ua8gcRHEOSjtyezhM1UxdkOk2EVIMVi+AJWo5RI +DZA==; 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=1768980093; x=1769584893; 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=U+/BmbS7O+j/0VSGODq8vN1tk7UlSU05tmyaOFwRICM=; b=lHrc+7zPI+Zfw//Ac4bsBQ0Nzw2c3UTJUdmMYGhxuv8NfbxpluS7FLr+5YJ4iAgf0B 4Ajm4r/9vezY8fFhv6wFrVUWYfeLKb9/WPdd5SyimB4irATZ8O2I4K08RAEZ07ZZvMQc vXv2ZfyeSuekZBJtSYwdg6Avi2dfWusaLdiMsVPvoqgJDIxE3KpGNPTHDaUMSMSecRP9 k2DTVqVMqlPfY6d/hmT18sl+kPOFk8iNYPf8ClonaXh2Fj5df4nmOglJIM8TTAnlQw+q kpTUki1Y9PQwn5dlhkPGZkosDpPxYESvxHOnYRaHzU0sVet7rI1+IQyQU/RO+pk5Pfco KzbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768980093; x=1769584893; 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=U+/BmbS7O+j/0VSGODq8vN1tk7UlSU05tmyaOFwRICM=; b=BGw0+/rm128lmKSmxETjgL3WcQ7F9m3KCLInVVt4GlB2+Gk2H6isxTr813ltPAVyzx rWPS9vAKLoAFX3+HGF8yx5RNAQctrYFlSFdmlEOIRGwWTaKi3eV6P6yt8bRTV3nYEhTb xwjwKJoN7YrgGDErBGSsgVilYOErfEEROBolCsmOUfpmm9eRyxeYLaZzJZ9I/Y2gr3vt hQABWgd/DGA8d+wEkwsEezywHvYc4SfbVeb6oDNyVbB9yDsOdypSGGzWur5wmLcS9Gex S5CYaPZxtr1rVrbXYDhXzcd85+E1g787JpRWs5An52pZTsyjMKdddpFCLRII+HkWVTye xUcg== X-Forwarded-Encrypted: i=1; AJvYcCXTzwrR7GW9FBB5Uax4T03dyKDYBOPYRjwCgFl90XgfWTBqXbQELrxSqfjo+8+oA0z9qGVQHQU+gbd4cj7w@lists.postgresql.org X-Gm-Message-State: AOJu0Yxn1jSMqlHqoqyBpQjoo5uRAf14jDJEKs9I2z6DTdwuYyvq40BR LlD4qO7koIqd+++FhWRwthBH5TKPO0/iH/HoVKmJAQDzWMct+ZkpBW2woaVGX38J8GLHTnlXIV4 Kn1XLHyIaHmhw94Kdv2UcJA8C4nufcCQ= X-Gm-Gg: AZuq6aKxtGxTeClnQ2toSijqkG8buv7L9iNiK7jpvNyl1/d0VBVqonYyNBMuibsNzs0 x5MtpIEFcKdsDXMhYWv2tDFv4cB/LCTxLLvyrgh4i+pzLrPZN9+EPdEAu7utJRBEChbHp/VV8J0 13mCn31LxCLNuiPX1EU81h3xgs8NWJtNtyOo+w2Owbgyl1GBECRgFbPd7GwrKILzHab/kYSACes dDR+vLzLxGpx4a0wL3dlm3NWeRn6T08o32gRZtBzsWDmDgs9n8XrbIsud+WqO0Ba55iGg+qKthd 8upsT5EcASpwbufZibdThpb5529S X-Received: by 2002:a2e:a581:0:b0:375:ffc2:1b40 with SMTP id 38308e7fff4ca-385a54b736fmr14632171fa.35.1768980092459; Tue, 20 Jan 2026 23:21:32 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Dilip Kumar Date: Wed, 21 Jan 2026 12:51:15 +0530 X-Gm-Features: AZwV_QjkJXNYEDShIXFd80fCPjuBDrSbbG34UFZtaWG1qUlizmCRj2FGrUUFKt8 Message-ID: Subject: Re: Skipping schema changes in publication To: shveta malik Cc: Amit Kapila , Shlok Kyal , Peter Smith , vignesh C , "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 Wed, Jan 21, 2026 at 12:03=E2=80=AFPM shveta malik wrote: > > On Fri, Jan 16, 2026 at 4:59=E2=80=AFPM Amit Kapila wrote: > > > > On Tue, Jan 6, 2026 at 6:13=E2=80=AFPM Shlok Kyal wrote: > > > > > > Also addressed the remaining comments. I have also addressed the > > > comments by Peter in [1]. I have also done some minor cosmetic > > > changes. > > > > > > > CREATE PUBLICATION pub1 FOR ALL TABLES EXCEPT TABLE (t1,t2); > > > > Did we consider using EXCLUDE instead of EXCEPT? In another similar > > feature being discussed, the community is proposing to use EXCLUDE to > > SQL Standard, so won't it be better to use EXCLUDE here as well? > > > > [1] - https://www.postgresql.org/message-id/63e1587b-4258-41de-b823-948= f8cc692d9%40eisentraut.org > > > > I am listing all current usages of EXCEPT and EXCLUDE to decide us better= : > > EXCEPT: > 1. Set Operator (EXCEPT / EXCEPT ALL) (docs at [1]) > > Syntax: query1 EXCEPT [ALL] query2. > > EXCEPT returns all rows that are in the result of query1 but not in > the result of query2. > > Example: SELECT id, name FROM employees EXCEPT SELECT id, name FROM contr= actors; > > > 2. IMPORT FOREIGN SCHEMA =E2=80=A6 EXCEPT (docs at [2]) > > Syntax: > IMPORT FOREIGN SCHEMA remote_schema > [ { LIMIT TO | EXCEPT } ( table_list ) ] > FROM SERVER server_name INTO local_schema > [ OPTIONS (...) ]; > > LIMIT TO (table_list) =E2=86=92 import only the listed tables. > EXCEPT (table_list) =E2=86=92 import all tables except the listed ones. > > Example: > IMPORT FOREIGN SCHEMA public EXCEPT (audit_log) > FROM SERVER remote_pg INTO remote_import; > > ~~ > > EXCLUDE: > 1. Exclusion Constraints (docs at [3]) > Syntax: > CREATE TABLE table_name > ( column_name data_type, > EXCLUDE USING index_method ( column_name WITH operator [, ...] ) ); > > Prevents rows from violating a condition defined by operators. > > Example: > CREATE TABLE circles ( c circle, EXCLUDE USING gist (c WITH &&) ); > Or > CREATE TABLE foo (x int, EXCLUDE (x WITH =3D)); --This is essentially > like a UNIQUE constraint but defined via EXCLUDE. > > 2. > In Window Function Calls (docs at [4]) > We use EXCLUDE in the window frame exclusion clause. > In SQL, when we use OVER (...) with ROWS or RANGE, we can also specify > EXCLUDE to control which rows are considered in the window frame. > > Options explained: > EXCLUDE CURRENT ROW =E2=86=92 exclude the current row from the frame. > EXCLUDE GROUP =E2=86=92 excludes the current row and its ordering peers f= rom the frame. > EXCLUDE TIES =E2=86=92 excludes any peers of the current row from the fr= ame, > but not the current row itself > EXCLUDE NO OTHERS =E2=86=92 include everything (default). > > Example: > SELECT id, value, SUM(value) > OVER ( ORDER BY id ROWS > BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW > EXCLUDE CURRENT ROW ) > AS running_sum_excluding_current FROM test; > > ~~ > > IMO, we use EXCEPT in postgres when we want to filter a set of objects > from all selected objects and we use EXCLUDE mostly in terms of rows > based constraints/exclusion. > > And our example of : > Create publication pub1 for all tables EXCEPT/EXCLUDE tab1,tab2; > > has more resemblance to: > > IMPORT FOREIGN SCHEMA public EXCEPT (audit_log) FROM SERVER remote_pg > INTO remote_import; > > So based on above, +1 for EXCEPT for our case. I agree based on existing examples EXCEPT seems more relevant for our use case. So +1 for EXCEPT. --=20 Regards, Dilip Kumar Google