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 1wXuP0-003YJO-1d for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Jun 2026 05:25:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wXuOz-000xRI-12 for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Jun 2026 05:25:57 +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 1wXuOz-000xR8-06 for pgsql-hackers@lists.postgresql.org; Fri, 12 Jun 2026 05:25:57 +0000 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wXuOx-00000002ICi-0T8e for pgsql-hackers@lists.postgresql.org; Fri, 12 Jun 2026 05:25:55 +0000 Received: by mail-qt1-x833.google.com with SMTP id d75a77b69052e-51790c0a692so6241781cf.2 for ; Thu, 11 Jun 2026 22:25:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1781241954; cv=none; d=google.com; s=arc-20240605; b=VJu2M4F9qRjeYfn1Quc2LSh9TRvgB75ijinj+P7/q3KYe/A/ttqoTqYHmXdwmuQnfs Jh5GVn+JD3udwMG1dq6sH7E1roeK2MLbmb5xM91xdNm/3KRdG8wkJd8W3wbvWMNOhMoO 49AnY5ayQQqffSqd8qdiXgxD1lj7y15iHpKf0vCeUvk4nAPxu18JRxf8+XHnF94XGdfz rqsi6TxVOGklrwznJZqAQywhyaDRLGGuRkc6S3R++YOr9Uz6ihL/Ow4+j4h9RHGucusj Ck+eEMJoGDjFWkwt6L1NwQiCqRQJaYcXGkMREe+cJpJx4HAaUR2AiHSHMHFVqNgOCG5z gtCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=pcYYjD4xSacrjjeZFS0zOsKckm/lYJ6dD9v9CaadKko=; fh=QzBLbTPBOhMN9B+BC/Pfl843jt0rLc8EYLI6ulpii68=; b=XGxzEGmKq5frCC7XD7LVDUWz98gsGQ2aOFN8JPFCd7YNOlGgrX6h6L4/DzggbnoWQQ 306orkoWxbQMB/TttxDKUcSzLFPyNnGCjj8PLt6MiSqdnuaTi91ClN2w08vvwEcObTaK SmxBftLU56rsVdOY3P/F9FIAtzBLlbFgLE4EvPQToub18SgQq291Bm1tGCBUGdn1Moe0 iNGZL01R3Sa44EgFkRnjLJgK73xUmhB5jK/+qmF48wIsFqX0KtveRN4JgEzBbbe1sGOl bBB9BtSMldIO3k2aItS74qd9mNd/NdBuQlXUGZbh6bClwfa04GF1aMWSumCE+IxJPkUG lP+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=1781241954; x=1781846754; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pcYYjD4xSacrjjeZFS0zOsKckm/lYJ6dD9v9CaadKko=; b=LfT82nG35NjHspzFs2NdzglaJ+hJqS6Q7ljbwczMUhqGwkF9t7pJRFcxp4ECZH9Asm A9aFL+21LgBKMOMLTiNJRFAF7ZCUVw/zy0iHXOBBAqg2fTOtI7QEtNeqjWptO7NbXXIV sx7zo1EFpErPM+4H+oOvsa5cUSzokLzT58nh3sP/qJ58cCaMaNWteJGXbgrBDKu6DmnD lSGQDru4MMIY6YA9KQwaYUgiiFpBACyd4bXsSfe+oKwWS/+SOgB8dMbPkYiNoVYd0gUh ISoHYPXcOzV7X7Z6OtFC1TBqQxgUQj3Ms8nD0RsjLAu4NjmZfXnThz2Tiqln6ddtAr+n 6z8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781241954; x=1781846754; h=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=pcYYjD4xSacrjjeZFS0zOsKckm/lYJ6dD9v9CaadKko=; b=E2Zkn0GyFRjSqwyq+u+wc8FUScu+Xrl0tTL+PnEKtH7L4LZ4X7eQ5EeWkqV1jFqJF9 ZQrEYYpweTW03W8bKUi/Fd1FqoPRkTbiqsRRKTV/BN5KCBV2yJhDx6L3GX4OTQOVJuT4 iuWSjwLRH6pyRXCH33x0y9HfYYzcDZtbWzbTPqpZ6hiG1DIjdh2i+H7tj3KZz2TtGsib V+5AYmy7T3nmr9pUTuK+shc6GUjO6UhshiotV2bA7g2qN0JHPngASGRnkfM4VS5Z2xtY 12vkaSwIops4+bO15OQ5IZ8Z09RDiposXYJ6DiUo3KA6Kugxrf331Cs22Qb/FRCg/B4B JkIA== X-Forwarded-Encrypted: i=1; AFNElJ8tMlTMw1pYwWSi+jwuxV5dR8jyOr++tJ8XrL/sisU/VkBnAorg66rgZvcOVZKqBf+tcH6zRa4dno+/n+VZ@lists.postgresql.org X-Gm-Message-State: AOJu0YwF7QuOT61Rutb1Hzit1a0W7QC5+7g6gEZfcl+Lpq6y5NtkvzjM 4kNDT+lqwjrQJ+2eL3pl6HIspysG1jOFiFiRQgcV8oT24FPYhUOKz4uzk9tb+nK0R07RY8eFlbe hevUqfkYvVNRDZOkWiqr61AZg2oTky/c= X-Gm-Gg: Acq92OGK3ZwccNMTIStZwC0qXdlZQXN6FrIn4MfvXZb6WdaH7vuAAFguNj+rrllT86D 1ZHtlBMkMMHiVQXXc6VnO0VOHXozDP/kH6pXzXihCeF+pUtMEhRIXSamjWlyd6fxn1I5nppLi18 tArCeVF0PFx+Wkxg2TuRS1BM78y7PyTFtAgMnndQXqeg2ZZO7a7LbKme6tlJ593YqYGn+pYNltw pd63yjIKTkCJLFieInqCuU1Xq0AhgJy3lVUWp3O+LrGaJ8BmcQoRFyrzu1jro+uDn6i8ybNRNUS X7/pK+G488DU4vg75g== X-Received: by 2002:a05:622a:4a13:b0:516:d60f:6438 with SMTP id d75a77b69052e-517fdcedb78mr20238541cf.0.1781241953706; Thu, 11 Jun 2026 22:25:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Peter Smith Date: Fri, 12 Jun 2026 15:25:27 +1000 X-Gm-Features: AVVi8CeYntdWLhn_0yY2Si1kO-lCCN9wS4DoCAVaTD7oAOegDToy87cZ60VCmNs Message-ID: Subject: Re: Support EXCEPT for ALL SEQUENCES publications To: Shlok Kyal Cc: shveta malik , vignesh C , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Some review comments for v9-0001. ====== src/backend/catalog/pg_publication.c GetExcludedPublicationTables: 1. - Assert(GetPublication(pubid)->alltables); + Assert(GetPublication(pubid)->alltables || + GetPublication(pubid)->allsequences); Better to assign to a variable first, instead of calling GetPublication() 2x. ~~~ GetAllTablesPublications: 2. - * For a FOR ALL TABLES publication, the returned list excludes tables mentioned - * in the EXCEPT clause. + * For a FOR ALL TABLES publication, the returned list excludes tables + * mentioned in the EXCEPT clause. For a FOR ALL SEQUENCES publication, + * it excludes sequences mentioned in the EXCEPT clause. (2 times) /mentioned/specified/ or /mentioned/named/ ~~~ 3. + /* EXCEPT filtering applies to tables and sequences */ + exceptlist = GetExcludedPublicationRelations(pubid, pubviaroot ? + PUBLICATION_PART_ROOT : + PUBLICATION_PART_LEAF); I don't think the comment is needed anymore. It was relevant before, when there was a condition, but now there is no condition. ====== src/backend/parser/gram.y preprocess_pubobj_list: 4. - /* relation name or pubtable must be set for this type of object */ - if (!pubobj->name && !pubobj->pubtable) + /* relation name or pubrelation must be set for this type of object */ + if (!pubobj->name && !pubobj->pubrelation) ... - /* convert it to PublicationTable */ - PublicationTable *pubtable = makeNode(PublicationTable); + /* convert it to PublicationRelation */ + PublicationRelation *pubrelation = makeNode(PublicationRelation); Since you are changing these comments, you can uppercase them in-passing for consistency. /relation name/Relation name/ /convert it/Convert it/ ====== Kind Regards, Peter Smith. Fujitsu Australia