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 1wTx0r-000qmf-02 for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Jun 2026 07:24:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wTx0p-009Kfx-1X for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Jun 2026 07:24:39 +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 1wTx0p-009Kfo-0U for pgsql-hackers@lists.postgresql.org; Mon, 01 Jun 2026 07:24:39 +0000 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wTx0n-00000000cC1-0k83 for pgsql-hackers@lists.postgresql.org; Mon, 01 Jun 2026 07:24:38 +0000 Received: by mail-qk1-x735.google.com with SMTP id af79cd13be357-915660e5b8eso46949985a.3 for ; Mon, 01 Jun 2026 00:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780298675; cv=none; d=google.com; s=arc-20240605; b=dmRwAM27uvyKb7Lr2wlJjqRHG4JEmUQsZguuAcoZAR7R5qD+VnPXUXJ6Jv4ArTbWjC 60AVSwnNOxUZ6JdGXC+KbX1jZCaU1B6Jz79JCjIQPqn5K6P68T0oFGo6lLKs34Ga7rJp FRS4mB7PyI13FVA7LMMm+KikWe1+C75Rv0QZikkmwjFJsOtMyIooOPZ5lcFxiQN660eS n6wq4l8DcHh58q1Y0mCpO1fqi3VTW06J6unSw2SE/ji5DLsefRZGJWi276FfvjV0lMTL OLsZLFbYAjJQQktE8uS2azYQINw70KA/py5/FqtVHAhAaYx/K2k4Sjeinm2Ews77ZAJm UAdw== 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=5Mg2vHlN2A9Sr7r7MZbkAviOKDzZYzNjC7iy4SbPgZs=; fh=7ISnXwMIkK5T0qW4g+DT1KpUCBDII+etjcU+71fGC+8=; b=MGFaa+Rb2yyJ5Mbh05qozdMrXkgWp9AiszStUG1gNby40cBdu/F2JBHsfczFu/x8nU 4jo2iMXhmEmx8DO8J86RjVs360tptwoiDfyeG/vEzzPdBIz+L4kHzNgjcY8NtLWDkBew rNUEuL6V1dzhUEzO7gomtI91W0/8NUssw8L/ctTeJHtP3Qv+u0vPMjArvbzCgD1hn8aw GL5F9pgl8MCC6HJ7xc/dbEjlw9+4EfEmBaYy0MEmN2KTIWa5nH2xWnRtAuR8fxHbaLFL 3bU7bqax7WY/TVcWg58wwqXa0AJAmxmKF5wcdQywdwsIMCng4QppVWkBIDKTeRB+U3LH Ta+Q==; 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=1780298675; x=1780903475; 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=5Mg2vHlN2A9Sr7r7MZbkAviOKDzZYzNjC7iy4SbPgZs=; b=BlZAUFzrEQ5eR3Yi4LAp8eEZXGKaVAYm3yKLzKkRdKDBBa/ky+1r0vXAe0ZLeyvfn4 qMX7d99QsPYDHRK3GSElLSU3CXjgGeRwnkT7szurMLxayV1yYMk1Ywrf/LPEf/pjQsgq 0DpBDfQ2Use4HfocAZ1QZqFnPsSjJln7iVumvgonGUijkcy86n0hp/IcsvncJhkjgvn4 0UPkH3vcufBGcvQlwdXPssZHa/mSERr1RwGNfqygkq/LAC7wmqYcZ59O/zIGukzAMXkD 0wt6e8Uke37i4FvePuTLHMOJam9280eAyFCec+9grc7W899uhvXZasmN/CUQ6nafRPNJ 4vhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780298675; x=1780903475; 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=5Mg2vHlN2A9Sr7r7MZbkAviOKDzZYzNjC7iy4SbPgZs=; b=fnbtsWjX7S2uh/scJ6Pg/Gl8GfXyG7I+rWCZSSyxQlxMoHbNWu7tnX29+agj7hx1DP SG0H8uXZJdaRqCE7vFE7UpfsBPyKMmIdDg/47va2CP/uaJuKLzntiR817LfKqq+bnv09 OpFAm93lohS1hu9vfEszXi5IzR+NyQnO6pvMI1GAXPl9+NPzE8qbuHA/bhOK6GsssFev +BZGygMBTOyFoBvYAHedBHBC3jMVX6dfWKVmxogMoGqpI5NqhBBR15eQ3jGJqhhOu5cV 8jRiZbSvUoCKEwMZuQL2nsxbebTGhoo0WqSwII6hYNHP9uG9Fkyd98CEwRkIHdpiChE9 ZYvA== X-Forwarded-Encrypted: i=1; AFNElJ9fKEXi9MZJhmXqopdhsGR85My8T1ZRBR+s/wkdQO/O7b+prAh5JJjl+raGa6Zb5nQOhCzVMLg87hfETtUP@lists.postgresql.org X-Gm-Message-State: AOJu0YznerssgZZtkEkzaaVf1WyJX7IinEGRF9A4ISW7uNj+t3tvkgzc 4FNIBAjkqUPXXhCFoCg3JtAAuZKHe3n2aDpq5qmt31RD1NYwNa222/Ry88NKAkfe59e4iFmvsF4 qvUnqOnbtmw3y7+LZUzWewWqxCiWcWiQ= X-Gm-Gg: Acq92OE3F+VUF5eW2wfBawYBATFubxT/ujDqIwUle4DiT9IAt2wHhbpLwG4SyEtBM/j bGJilECxj+sv3jkXYXF34AHTnuWo2OBeY6Q1vDyO3AUswwphsSStgrVx0zW5A3yhBqYbEmQJKjv omxh2C5qxKY5SKBnAAs4LGDV+sGYdbmDOtXp/jEQoBdXlwTqOlLO7SvcuqABNc29rB7PKNHW5P7 dsKF/Ji7xOQKMQcjkRFvwFbXm2UX0bkLAW9U57+6+EfhhnUz82HU+Q6ToRNHy3AF6Rql61PpqQy teiw14hT7E2X605Kbw== X-Received: by 2002:a05:620a:4055:b0:911:dfb6:d89b with SMTP id af79cd13be357-9153dbd4cd5mr1634286685a.39.1780298675020; Mon, 01 Jun 2026 00:24:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Peter Smith Date: Mon, 1 Jun 2026 17:24:07 +1000 X-Gm-Features: AVHnY4JCu9-0qInmiUagVmdgU28Ey7CxS8nmyI18Q9dsz6IQqlCks-xNfbil9Dk 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. Review comments for v8-0001 and v8-0002. =3D=3D=3D=3D=3D=3D git apply gives warnings. 1. git apply ../patches_misc/v8-0001-Support-EXCEPT-clause-for-schema-level-pu= blicatio.patch ../patches_misc/v8-0001-Support-EXCEPT-clause-for-schema-level-publicatio.p= atch:176: space before tab in indent. errmsg("relation \"%s\" is already member of publication \"%s\"", warning: 1 line adds whitespace errors. =3D=3D=3D=3D=3D=3D src/bin/psql/tab-complete.in.c On Sat, May 30, 2026 at 2:32=E2=80=AFPM Nisha Moond wrote: > ... > > 9. > > BTW, the current code is not able to handle multiple schemas. > > > > So, this works: > > test_pub=3D# CREATE PUBLICATION pub1 for TABLES IN SCHEMA myschema > > EXCEPT ( TABLE WITH ( > > > > but, this doesn't do anything: > > test_pub=3D# CREATE PUBLICATION pub1 for TABLES IN SCHEMA public, mysch= ema > > > > I think the above preserves the existing behavior. Currently, we do > not suggest "WITH (" after the second schema onwards. To support this > properly, we would also need to handle "WITH (" suggestions for > subsequent schema entries. > > I=E2=80=99ve created a top-up patch (patch-002) for this. I can merge it = if we > want to change the current behavior. Let me know your thoughts. 2. Some scenarios are improved, but others do not work (either newly broken or maybe they have been?). TBH, I am unsure if the added complexity of patch 0002 was worth it. I am going to pass on this for now and wait for other opinions. e.g. Good: (suggests schemas to use) test_pub=3D# CREATE PUBLICATION pub1 FOR TABLES IN SCHEMA CURRENT_SCHEMA information_schema myschema public Bad: (does not suggest more schema to use) test_pub=3D# CREATE PUBLICATION pub1 FOR TABLES IN SCHEMA public, Good: (completes names of known schema) test_pub=3D# CREATE PUBLICATION pub1 FOR TABLES IN SCHEMA my becomes test_pub=3D# CREATE PUBLICATION pub1 FOR TABLES IN SCHEMA myschema Bad: (does not complete names of known schema) test_pub=3D# CREATE PUBLICATION pub1 FOR TABLES IN SCHEMA public, my Good: (suggest EXCEPT with single schema) test_pub=3D# CREATE PUBLICATION pub1 FOR TABLES IN SCHEMA myschema EXCEPT ( TABLE WITH ( Good: (suggest EXCEPT with multi schema) test_pub=3D# CREATE PUBLICATION pub1 for TABLES IN SCHEMA public, myschema EXCEPT ( TABLE WITH ( Bad: (doesn't work if the FOR TABLE precedes TABLES IN SCHEMA) test_pub=3D# CREATE PUBLICATION pub1 FOR TABLE mytab, TABLES IN =3D=3D=3D=3D=3D=3D Kind Regards, Peter Smith. Fujitsu Australia