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.98.2) (envelope-from ) id 1xSLS8-00000001li5-1Hnp for pgsql-bugs@arkaria.postgresql.org; Sat, 14 Nov 2026 21:38:28 +0000 Received: from localhost ([127.0.0.1]:45032 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xSLS6-0000000EB7x-1NQx for pgsql-bugs@arkaria.postgresql.org; Sat, 14 Nov 2026 21:38:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:55864) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xSLNm-0000000E5Tv-0CqC for pgsql-bugs@lists.postgresql.org; Sat, 14 Nov 2026 21:33:58 +0000 Received: from mail-ua1-x92b.google.com ([2607:f8b0:4864:20::92b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xSLNk-00000000xpu-0DC1 for pgsql-bugs@lists.postgresql.org; Sat, 14 Nov 2026 21:33:57 +0000 Received: by mail-ua1-x92b.google.com with SMTP id a1e0cc1a2514c-9828fee1b4bso466222241.3 for ; Sat, 14 Nov 2026 13:33:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1794692035; x=1795296835; darn=lists.postgresql.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=NYGE32SdEH0kYqmuZ3HFX4BER6JqW2bflOnqlYNcURE=; b=gqNPyX4dy5I4oMoXeOAAtR1JVAQ10ahQfB0qph7NqrNnw3aQFxNDdl2Da/8VHQv5H+ rzHimawNU9h0RE6BFmR3tWuarlNQ1HqyTjGUo0HWnEHsOWh5kUhTltMiP8ecLCVVirsD 3yVkiOYkkYQTjaj/ddBh95UPdoG3u5VkqDTcI2wDpYwC/AmP1xk7+R+psesPP4ON05Lm wn89iIP/n6UvUE6tgG/jWwwdYCyP6QYBowYAzIyckh0QUNc1Mg2fRJeg7BdVr86UfdJO ZUGIP8n624+FAM5hcjmQVcIhC4Pi6m67SYqfhbPqnzE/zTNN6YaxOErbHg5c/b7vwYec t3dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794692035; x=1795296835; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=NYGE32SdEH0kYqmuZ3HFX4BER6JqW2bflOnqlYNcURE=; b=hVPBv+9YuMRo/JhVqVMgyH2wjcFOquP6qNCKiDiV2Vi0BgXPdMk8eqN3SrAmcPe9Bx rB6BCGq70DvbJtnKwfCLAFxM89vSYkPMKgjRLpv2hD03hdeQegQCNDKdxq9BK2n5oIv4 So/EK9rx+PI42ruXUoGvRnqiA+j5auPXJtiylmABayK10FnzPO6MMWy7i0jb6wnm4CZ4 nsAfqunBDY0IWF5L46DG7hWuBF1KxOWVY1Q7S2mvPqfDUe4wiVM4rInBNGMtpBbwLrLS /BFs4WAprJ6NydZWMmJHX04cu7N3O+Xb1D4S4+Uqixf555H1VmUMGgNQn5APQcyYUnXA ORsg== X-Gm-Message-State: APuU4Z/1vmV2ccyrh4dOxIurB8TmhyLEFpEXz8pM5Bo9lWAbxOQ3GmIk 7LEPExgFFw48xIxD97FEKVvtOZ24oUQLeeGHCtXlxYk8W9iDapcmfwWI X-Gm-Gg: AYBFou1Q1VPy80WXO3PUQwk2WB7pTgSLw9BioswxDhxYTOsZ134nPZOg4SSg3LrLexM Nb8qQ5m1SeeuTbrsgD7UDOdv3SCsvKECaSSEN5I9UILtpdCgXJm2AC8RLzlf9otWHr5r0rNQ0Uj UgTmrxchi/Sb7PaWe2eK71NHb0SPW2s7lYFZCGsiA+vp1NN8t1WtT0yv6CFGr49VVm9+dgThi4q Jt9tZRFhciZvzjQQbyKrJC/DujCUHpEuo+wSutBtYGZzXJ9q5ZVAFxSEgi2h4ZOzf3mmUUfJ5sV JRdwZGoBXDF60RN7ZvA71kfGvTp1e8mPLSiWx9ak4vwZEnrW/Bmrf3Yj+AymZBIgJKb7OSBU5pg X89hlHLLL2b5t3M8m+/K6pwp83w1tMGilXDtkvrSlxDn+EhzesP5TgjPeExe04kbP+ryRnYVUTd orzOYGSAwj1gWxHL9ZhwD45DxIpMk6ONVIt4WG31i/Jq8FmNUdnyTU7T5Y1WNIzMp0M8CWkfRqy vlqCQy+dJASUd1gID2AxTEF51w0B7tbwkVzuliN4Gw47GwWGNRgbcaq0casateYsowtgYiRJfZk LCfrzn/sgXAT9l66snkqOLgh2qIsYvWi4ts6NrM83vYw954VuXztG+JkaWeGFN/997ONUR4KTKL ejQbgKI9oZOIrHcY3EmH7cpv07+1sFnmJdiKpO4bE8OUabv9fvzkBmSLSTRFV X-Received: by 2002:a05:6102:f82:b0:7d2:7377:32db with SMTP id ada2fe7eead31-7d64d80cf1dmr1705782137.24.1794692034803; Sat, 14 Nov 2026 13:33:54 -0800 (PST) Received: from NOTEBOOK-LAILA ([2804:14d:5c27:1387:a053:f15d:8c82:ed64]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-99c842ac652sm3771171241.10.2026.11.14.13.33.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Nov 2026 13:33:54 -0800 (PST) From: Joao Rito To: Dilip Kumar Cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19807: CHECK constraint not enforced on partitioned table Date: Sat, 14 Nov 2026 18:33:45 -0300 Message-ID: <20261114213345.227-1-joaovictor.rito@gmail.com> X-Mailer: git-send-email 2.53.0.windows.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Dilip, I tested v1 on current master (206e719, cassert, tap tests) and it applies cleanly. With constraint_exclusion=on, "WHERE NOT (f3 > 30)" and "WHERE f3 IS NULL" on the parent returned 0 rows before the patch. After the patch they return (12, 24) and (10, NULL), and the plan scans gp2. The result also holds after a pg_dump and restore. The regress suite passes (243 subtests) and I saw no assertion failures in the server log. What I did not test: the isolation and tap suites, pgindent, the docs, and a CHECK constraint with a whole-row reference (my attempt failed at DDL time, so I could not tell). Small points: the line with TupleDescAttr(...) is longer than 80 columns, and the test could add a direct scan of the partition (include_noinherit true) to show that its own constraints are still used. Do you think the INSERT and trigger WHEN cases from the report need a separate follow-up? Regards, Joao Rito