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 1vstB7-006iTD-1q for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Feb 2026 01:50: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 1vstB6-001Jua-1P for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Feb 2026 01:50:04 +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 1vstB6-001JuS-0d for pgsql-bugs@lists.postgresql.org; Thu, 19 Feb 2026 01:50:04 +0000 Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vstB3-000000004Ea-1xcw for pgsql-bugs@lists.postgresql.org; Thu, 19 Feb 2026 01:50:03 +0000 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-40974bf7781so1118891fac.0 for ; Wed, 18 Feb 2026 17:50:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771465796; cv=none; d=google.com; s=arc-20240605; b=dcSXGr87KamhqsU6hNkxWR2zUt+NBbt4eynbn2yMgu0BDqkEl4Eig0Jj9TR+HVWd/M sITzdWQYR05XdeV03O6CJpUZA909ScV0gKsZWLjpTx40jJTvyOzo+UMLLTGY6Wv3mHVH 6OOZTulGsO7B311302OASLWahUbERdGOGLUlvyVCNmrtgwF800Q5FgLC7FIetEMbFkll meww7/atXxvGMmQ19CjldUYGe+xiVu/pTt1f002uvFx+dfO4bJWDERg1C4rbH8JgbBy0 vqTfGtRsNQXyhhSR9mALwumccFRk0vguZ4GYbQ1opYC58jHynPVPf9aDoibtT4tLl+rb VgGQ== 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=Y/MeEgbUHDkJGCr5O8uZPvkra4DMFKr6UFF3tLdmYok=; fh=E5kbeA35Sgmr0SXaRoQb5PqSoipyCm7vDB+O/EFTCbk=; b=TdN9/8KV4lWiRx5Mr2bSs7ZCVG851NoVYlvpF4c84hk+wIBlq2zvYSmvq5ZM45QHSr ivNxqiSnq5vVHooqyBvryqae/Ay8/oi0FAaqkdAh3xvj3KivfAfMDjJz7VJgYOBy0ehX xBWTCI/3rjNsnBUr6p1uZKEKwsT7gUbL+Q6gTm29LVf8zjDWRQCC/s6sHNMyNt+g/36p QwdZSkwO1AYG1OmDvHc1Ol09g7p1dGusIRs5Z16oXKdoTk7VEtaVOM5BIgQBnXuXGgQc XNJgjNBW7zlT0razv0LJPQMUXiOfJfcljNLBZTkSMmPwVMTqEI0Qpj3Mzj77Qroa4xm4 KDaw==; 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=1771465796; x=1772070596; 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=Y/MeEgbUHDkJGCr5O8uZPvkra4DMFKr6UFF3tLdmYok=; b=SP0butyGS1/XjGnUsZQyX34XjIJRzaKyym3ILR2DV2yuShBdxv+PmCWxoOZGHAMgyv HjFIplNcsFfpt3ivvIh5EYx/pcqzYGzbRNhJnVhQPJjdX6RYCkGhlDXGXDTvvUafGX7m VNQVepmKR14M60hhy3Gb24zYpx+IdFnpIYSkCZG6ARsoU8yuqSANWmkPywq/gzfcAzOK gF4wVjgMfAhiwrgFi5gwlaALPCA/I1s8ccrrGd5fDTA+WLLSpvk8Dog4N60DmpR9De9Z hpYhxxf2JgwwWTHpG8BXg9SDJKlBElPqSuYLHKddeK7zt5JWX/plYzg5+E/WXNybTHlI yTGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771465796; x=1772070596; 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=Y/MeEgbUHDkJGCr5O8uZPvkra4DMFKr6UFF3tLdmYok=; b=McWt1bSa1DIzDNtwLKxB4aHQRbIeFNFDZR0PcGs4zn5D77RfrvbDphw0iNVswGo2yE 8zWLaM/bbm8QbMb+aiY8iUc8dl83PEgtouFq3tD9E/V/5n06/0dkJzWsvX6NUE2isFN6 C0RNnKUva/HbfI7f//syKmKAObEEHlD1SnwAXQDbcLofnFK3MRa347WGnW522RQUzzyk jsSgkMEAiaY+MBwK4VyWG4gTsexfirC92RGgEeWgrU46Cg7R6VNOKl4XfcQQTaa1r42h ir+pPk1Zu1ss9YF8dlIOQqw7bQTYtN9RHjECOBj0+/F+rWxUqjGtgvlCNVI2TKqYVKvD k7bw== X-Gm-Message-State: AOJu0YyPHsKjghTF8oFqyjkGxtqCsPTCGUlaIMTImCX+a1QW1mXG+t/Q 15b+lyjdObhbbfvAOjWXuzwDJnGsy4HFGHB8OsYhsnPVDSZ40AhDV2sDle/nHSfy4py0nMZdoVi UlVCTE2tMuWV+GKUPP/+0GbugssTWjM4= X-Gm-Gg: AZuq6aIJ9HENkpsLBcZz3sxN0ELIpzwtWqweDLvlWGPCbw5OllvRQBQfYXkiStdAr4f 4RZzs5SJLaGUe4C1yog3No0SqIg8SfwNPi43Qld0nA8BCZJ3G2ptLNaUDWn1XeFoQJ5Moln4hOw G8dOZD260HTlU5P18xmCEPu4n1N3jfQPH3hmw84ZEYH2u6ZYapx1Q10qugoVLHL8J3YjCFK+vLA UBZ/dR+kYt5l1Nm/ugze/kpxbPCUB+hI3OwrpuKr2WSg1h/GnTbo5gaepJfWOYq8v7TjueDhlw3 NUFI+cJH X-Received: by 2002:a05:6870:b156:b0:3f5:b761:5234 with SMTP id 586e51a60fabf-415458dd02cmr142642fac.28.1771465795685; Wed, 18 Feb 2026 17:49:55 -0800 (PST) MIME-Version: 1.0 References: <19412-1d0318089b86859e@postgresql.org> <60be6cb1-10de-4e24-82ce-b02650442d97@postgrespro.ru> In-Reply-To: <60be6cb1-10de-4e24-82ce-b02650442d97@postgrespro.ru> From: Richard Guo Date: Thu, 19 Feb 2026 10:49:44 +0900 X-Gm-Features: AaiRm53us3fZuQut0K0GBFwr2cRquLhIKdI5_vH1el1nb6F9dAnkgpla158JiHw Message-ID: Subject: Re: BUG #19412: Wrong query result with not null constraint To: Sergey Shinderuk Cc: pgsql-bugs@lists.postgresql.org, Tom Lane , David Rowley 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, Feb 18, 2026 at 9:03=E2=80=AFPM Sergey Shinderuk wrote: > I'm not familiar with the code, just curios. There is a long comment > above saying "You might think we need to adjust var->varnullingrels, but > that shouldn't need any changes." Doesn't it need an update? No, I don't think we need to update it. That comment explains why varnullingrels do not require translation (since they are outer join relids, not baserel relids). It's unrelated to what this patch does, which is about propagating varnullingrels into the translated Var. - Richard