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 1w37dx-000v9w-2C for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Mar 2026 07:18:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w37dw-00H1LB-1v for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Mar 2026 07:18:08 +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 1w37dw-00H1L3-18 for pgsql-bugs@lists.postgresql.org; Thu, 19 Mar 2026 07:18:08 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w37dt-0000000152I-3cRU for pgsql-bugs@lists.postgresql.org; Thu, 19 Mar 2026 07:18:08 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-48557c8ad47so4713115e9.0 for ; Thu, 19 Mar 2026 00:18:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773904685; x=1774509485; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Us+iOTOff6GyhgVsOMSOH7sMFtv15EhzSDZPoWk2ymo=; b=a5gBC61zuD/BQgS8FY1u+3dfEB7JIuFQXLio8YZk7E/tN8J9QmFGkU4JWRf5RxYOoO HPSVCjk419gutLKE53+9ebRvLI87FP6+qLx4Y8VQbKptGxMu6Ke8q3J5vCNhzKEgIGh6 GfMBh8k11ObyRTTjOoIpNBHJHrv08jjk6laAwoBO5p1x5e5Dq2XaobJ2VqRBeuwGoQ2h lCsogbagTQ6D/vaZ8/OOQ917x4ukxWf3yBanWXfavtjb20bAt5dVWZsNpNfgrWdIMIeW JmcU9apbIhu89GdZI4plCaqPgDY0SCZ4uYzahcVr89hy9SsoaWkpVnoeRyDrfa7f4vqg VBKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773904685; x=1774509485; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Us+iOTOff6GyhgVsOMSOH7sMFtv15EhzSDZPoWk2ymo=; b=kLsc/CTDZMUDIftumTx7QqbOVCw4YgRWBBkh2ah8sBRqvou2s1z4z7TpyNkXjfX1+S 9vTNLtSZCC+oonV6Zxx5op5El3Jlo8nKrJgBVO2zW0Uzer4DIClAQNnLfC6SI2q/g4RX CGkMGzi9uMSYWeXqYvp8iuxixWMkjeZKsi0VDKkkZwI3IkGC87zXdsUbgMWm/bzIg5VD j3Rvs8ItYVRxdgEAnqK6vcbzbv22NGMFeWtbwhy1cUuYLSmsqcKtIwU6B1DU/5QUDkKQ FMep4aVgwjWFft2R0F1pPSeRIB0YzKRvpetEX9eGsQ6VIQUBYSSe8cs/tRtiOySrtccQ Q7nA== X-Forwarded-Encrypted: i=1; AJvYcCXoAQkNrEEqXRvmZmK67yLxPIszCicZHTZgTWZ20xGHxbKg0d3efNOi2tsPUQ1t3pRgppGUUiWTsyuZ@lists.postgresql.org X-Gm-Message-State: AOJu0Yx79yklun0qz8kWOxfPzjbjl99kBNHOC0OQDWAd2hg1h9jIFiDA KJkiBh1pjA/At6uuQzSpAVnSlrKuZGLGGgWPV4SohtvzNVVvef73iPuZPdnFVETwgN8= X-Gm-Gg: ATEYQzw01uKByKEcygLmTs4m4FUqj+pgr3k0BqUeuzBoFjPht0j+75cjC4/fGMiRIpR 8Wq5VDAFGecQveZbEa0MGo3QJDdd48OwGZK9iBmUAAmkQTpuW8RgRrhLynLhYBWnPuK6ZzvLQXo v9o8ZI1M8ZeHJySEAwqYlfbzbGlopNSbqcuW87bOpfmLkC0XuRWy6AaiXy4vy6MvQnY5tved2bU RDPDpfaTomJ51A8fK3cbOB6zleh8nw1qcV9YPXyrir15JELTs86zEdUYC99IJLcoEsryzUi+TiT bX0DaiqjKoBKO1Xa2s8t230/mp8uwoXowXr4voH92PkJPFzuerzPvaLjhrrdSAYwAmiEBC9P7MU j9SUyEun0hqSI4YwLVPl6bIy2S74rGiJSMRd6uoCifAqeARH58ioOaEDO+RJcsmovgZs2o+UaZk BLpCETtOK9eIpF6BscQIfJuY6NGSEpDsy+hQ== X-Received: by 2002:a05:600c:1d0b:b0:485:30f7:6e88 with SMTP id 5b1f17b1804b1-486f4577061mr105781695e9.31.1773904684896; Thu, 19 Mar 2026 00:18:04 -0700 (PDT) Received: from [192.168.15.192] ([80.251.191.198]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-486f8c350aesm44416445e9.4.2026.03.19.00.18.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Mar 2026 00:18:04 -0700 (PDT) Message-ID: <5a039d60-d13b-4cf0-a807-9c7269f06831@gmail.com> Date: Thu, 19 Mar 2026 08:18:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: BUG #19435: Error: "No relation entry for relid 2" Triggered by Complex Join with Self-Referencing Tables To: Kirill Reshke Cc: Alexander Korotkov , Tender Wang , Fujii Masao , ammmkilo@163.com, pgsql-bugs@lists.postgresql.org References: <19435-3cc1a87f291129f1@postgresql.org> Content-Language: en-US From: Andrei Lepikhov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 18/3/26 18:55, Kirill Reshke wrote: > On Wed, 18 Mar 2026 at 18:31, Andrei Lepikhov wrote: >> >> On 18/3/26 13:21, Alexander Korotkov wrote: >>> On Wed, Mar 18, 2026 at 2:18 PM Andrei Lepikhov wrote: >>>> What is the reason for the second change? Tender, can you show us how to >>>> reproduce the issue so we can support your update to >>>> restrict_infos_logically_equal? If we include it, we should add a test. >>> >>> I think Tender already shown this in [1]. The same qual is present >>> twice in the plan. >> Got it. I suggest making this a separate commit to keep the history >> clear. Let me share a draft with a test case for the bug fix first. > Hi! > Is `cool_bool` a typo of `col_bool` in regression test ? This is actually a happy coincidence, not a typo. We made this mistake during initial development because I didn't realise that a boolean operation on a bool variable is never wrapped in an expression structure. It's a 'cool' example that shows a rare edge case. > And the patch seems to have forgotten to add "Reported by". Yeah, let the committer manage the award part. -- regards, Andrei Lepikhov, pgEdge