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.94.2) (envelope-from ) id 1rchWL-001Ymv-Ak for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Feb 2024 08:00:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rchWJ-003XSR-G5 for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Feb 2024 07:59:59 +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.94.2) (envelope-from ) id 1rchWJ-003XSJ-24 for pgsql-hackers@lists.postgresql.org; Wed, 21 Feb 2024 07:59:59 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rchWC-000EVJ-O9 for pgsql-hackers@lists.postgresql.org; Wed, 21 Feb 2024 07:59:58 +0000 Received: from [192.168.1.36] (cm-27-145-180-103.revip12.asianet.co.th [27.145.180.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: a.lepikhov@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id D0126E20E8F; Wed, 21 Feb 2024 10:59:48 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1708502390; bh=kLoO9LTE+ajreydQ6S2uJdKhV+BvkmMGU0rbf0id4DE=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=FNa3WjL0NDCAvNURUGd1NMu0LwP4Ios+hW26+dUzDaOTzkduq1buQx9g5KjoTSncX 4+JvaGmVX3Ek5wfAOiaYuD5VvCYwnHKWooZw/CIdE1mY7FnWmwEYFMxNHRaeTPHg/o a7prilMzX4usqsW8sek8dYT1WzZEdYau1YDvDkci4+IscGO7xpXEjRtBcpNkSpL+s0 9QAYLOgwzrkONtP36IkbV5ZBAl2MakfFkNGyShC2Auon8tqrl7gfRnFtPOzrYAyCCx YgdaqWNyC0X2agzDaMalk8tcqPCT4YEWQQM85RykySJwB8Vjt86QFOau+b1h18UUaR Tr6FB3fGJu0og== Message-ID: Date: Wed, 21 Feb 2024 14:59:45 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Removing unneeded self joins Content-Language: en-US To: Richard Guo Cc: Alexander Korotkov , Alexander Lakhin , "Gregory Stark (as CFM)" , =?UTF-8?Q?Micha=C5=82_K=C5=82eczek?= , PostgreSQL Hackers , Tom Lane References: <64486b0b-0404-e39e-322d-0801154901f3@postgrespro.ru> <922623af-872e-4cdc-9238-129b18bee42d@postgrespro.ru> <107682e0-137a-d0fb-2733-7fc6e9562690@gmail.com> <0c5f461f-e26f-4fd9-9700-91b0e9c38fd6@postgrespro.ru> <336c748b-4ffe-5915-3d3c-ece6d19e021c@gmail.com> <4788f781-31bd-9796-d7d6-588a751c8787@gmail.com> <56ee4520-e9d1-d519-54fe-c8bff880ce9b@gmail.com> <5063f378-ca3c-405e-b1e8-1927ea9052e8@postgrespro.ru> From: Andrei Lepikhov Organization: Postgres Professional 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 21/2/2024 14:26, Richard Guo wrote: > This patch also includes some cosmetic tweaks for SJE test cases.  It > does not change the test cases using catalog tables though.  I think > that should be a seperate patch. Thanks for this catch, it is really messy thing, keeping aside the question why we need two different subtrees for the same query. I will look into your fix. -- regards, Andrei Lepikhov Postgres Professional