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 1sTj8p-001ob7-U9 for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Jul 2024 14:26:56 +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 1sTj8o-001Bp5-3C for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Jul 2024 14:26:54 +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 1sTj8n-001Bow-Jl for pgsql-hackers@lists.postgresql.org; Tue, 16 Jul 2024 14:26:53 +0000 Received: from forward502b.mail.yandex.net ([2a02:6b8:c02:900:1:45:d181:d502]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sTj8i-002Luw-Tx for pgsql-hackers@lists.postgresql.org; Tue, 16 Jul 2024 14:26:52 +0000 Received: from mail-nwsmtp-mxback-production-main-67.myt.yp-c.yandex.net (mail-nwsmtp-mxback-production-main-67.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:36a9:0:640:198:0]) by forward502b.mail.yandex.net (Yandex) with ESMTPS id 804A35F110; Tue, 16 Jul 2024 17:26:42 +0300 (MSK) Received: from mail.yandex.ru (2a02:6b8:c12:5182:0:640:fea7:0 [2a02:6b8:c12:5182:0:640:fea7:0]) by mail-nwsmtp-mxback-production-main-67.myt.yp-c.yandex.net (mxback/Yandex) with HTTPS id cQIt820O6Gk0-DBUvsScM; Tue, 16 Jul 2024 17:26:41 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1721140001; bh=H+I48pRFlY43vmUatUqb+bgMRtzjZ9t6b9d6pizvcp0=; h=References:Date:Message-Id:Cc:Subject:To:From:In-Reply-To; b=iuvTJS5tKA/lotSYCDoOYdnrkFKnfkv6gQKdrOHxAx13x7UZM4lr9UMkBmMa9JcIU jTTyGxaY7yf7TNo0FRXqytmwLRKCKs9vOe00UbQcdPrZnbYKuRmzW++mQ43Fc5vNuy elSMq7KWVFOfeg/VPZMRcrNWlh+e/5DpixqnPeJA= Authentication-Results: mail-nwsmtp-mxback-production-main-67.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: by gnj7pzdquwgrabfp.myt.yp-c.yandex.net with HTTP; Tue, 16 Jul 2024 17:26:40 +0300 From: =?utf-8?B?0JLQsNGA0LTQsNC9INCf0L7Qs9C+0YHRj9C9?= Envelope-From: vardan-pogosyn@yandex.ru To: Andrei Lepikhov , jian he Cc: Alexander Korotkov , Tom Lane , Robert Haas , Andrei Lepikhov , Richard Guo , Alexander Lakhin , "Gregory Stark (as CFM)" , =?utf-8?B?TWljaGHFgiBLxYJlY3plaw==?= , PostgreSQL Hackers In-Reply-To: <3d9457cc-a440-48a5-bf44-8eb3f65316f7@gmail.com> References: <64486b0b-0404-e39e-322d-0801154901f3@postgrespro.ru> <2422119.1714691974@sss.pgh.pa.us> <24e93efd-eeac-43a6-a75a-ad68eacb32ee@postgrespro.ru> <3622801.1715010885@sss.pgh.pa.us> <96250a42-20e3-40f0-9d45-f53ae852f8ed@gmail.com> <5b49501c-9cb3-4c5d-9d56-49704ff08143@gmail.com> <6da9bdb2-3ff2-4b8b-818a-8052772f2163@gmail.com> <3d9457cc-a440-48a5-bf44-8eb3f65316f7@gmail.com> Subject: Re: Removing unneeded self joins MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 16 Jul 2024 21:26:40 +0700 Message-Id: <2581461721118083@mail.yandex.ru> Content-Transfer-Encoding: 8bit Content-Type: text/html; charset=utf-8 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk
Hi!
 
I did the SJE testing at Andrey's request.
To do this, I used the automatic testing tool EET (Equivalent Expression Transformation) [1] with some modifications. 
EET transforms the logical conditions in a query, creating multiple queries waiting for the same number of rows.
 
In order to make sure that the SJE logic is executed at all, I tried to cover the code with ereports() as much as possible.
During the testing process, I did not find any inconsistencies in the number of rows returned, as well as other critical problems.
 
 
-- 
Regards,
Vardan Pogosyan