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 1rblSY-00GsKW-5J for pgsql-hackers@arkaria.postgresql.org; Sun, 18 Feb 2024 18:00:14 +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 1rblSW-00Ahqx-PV for pgsql-hackers@arkaria.postgresql.org; Sun, 18 Feb 2024 18:00:12 +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 1rblSW-00Ahqp-GC for pgsql-hackers@lists.postgresql.org; Sun, 18 Feb 2024 18:00:12 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rblSP-007Ogq-Kk for pgsql-hackers@lists.postgresql.org; Sun, 18 Feb 2024 18:00:10 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5114b2b3b73so4167116e87.0 for ; Sun, 18 Feb 2024 10:00:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708279204; x=1708884004; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=JBAihf1wGVy/yNZikQdQ39VxvspTij61gjz7OS98tnc=; b=eK/0BBXff6GQQF1EJXsEDji/eAEBtG9wjQjXbxdEaJjKwoUs3lYj/cw9iZMhsK7O/O KVJEtFQ9b25LdmZ01OyYZCMZCMCcGTYtN3HHeZ8xdSU3gIUHRzxAtakhF1GdYTJVkIDB gc1v/T3Xi5Ewq3YXosQ4lYCesTu9wUpVYEvdCuf1K6Gk1raIthyZ5uR9lXBJ5nXsasMS GS5wYMh7G1ZDxD2OXHGEiXnADrLjR3vPeNVmRSNbIZmnuX1p/5XqT7A6gRrcxoQSDJmE vz+Vm4yhxmYoVwU4y2c/plz/VQfSIIeAkdDO7CMcaJC7ebSH3ToD6RAHYP/uV89ABNEZ BaMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708279204; x=1708884004; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JBAihf1wGVy/yNZikQdQ39VxvspTij61gjz7OS98tnc=; b=gysLpCRcYuwAaMnayJrvQJ7N77FYavx6vafeqc08Rt/IefYWAqorm5ygvVnSUgvuHp jEfF3mTaborLcpV5x3ih6FdLf0EMPlDTF5pO3QiNCg4KcHHb1FRt0/qqgET0Ux0hrXeu uw8VEPWst34sWNZU8s1BDeWp2yTX/iqUOZQZAeeKnUOxigKq/juWSoO+gk1VAyK3vnjO W/lCT0egmrfNOgLW10nA4dj3Rl0/6O2bRvCZCqvE/fjzX5sU+s4tx6+N+ZQlMpDm4XUX QnlBcIkT69bVOdWE4hFJXUiHDhVHZFbL1DgQbtqZB7oFPh4ealX7rq4rcb34w8IY+K5C eRFQ== X-Forwarded-Encrypted: i=1; AJvYcCVjPUpKZINaF2sWqWl+mCv1VZsw6uBsteuDCAq4uxkJrwx9kBPpptzOH3sAm+hMb5wXcUhkhp/meWUZHBlNSnbpA2w+xQxTdaZrYA/W3YKOBDpa X-Gm-Message-State: AOJu0YzDmiSb515F1n5IRFAvBwdbs2NqeUaIZOPW4P6awjDDSTr5XfOd EHmilAn4REQ8xTHATGxLnN2NkekgLzPwmpI9dwxir8xKyurOIMTd X-Google-Smtp-Source: AGHT+IFU3r+5fK/JYsuavY0ogBJX3WbF8HE1QjMUp/dDECYMHfEflXP/QTsZ+9Aq66pX/xwuOdRwOA== X-Received: by 2002:a05:6512:e91:b0:512:adcd:223 with SMTP id bi17-20020a0565120e9100b00512adcd0223mr1355998lfb.34.1708279203563; Sun, 18 Feb 2024 10:00:03 -0800 (PST) Received: from [1.0.0.7] ([91.185.76.177]) by smtp.gmail.com with ESMTPSA id u21-20020ac243d5000000b00512acd8ec87sm293321lfl.224.2024.02.18.10.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Feb 2024 10:00:02 -0800 (PST) Message-ID: Date: Sun, 18 Feb 2024 21:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Removing unneeded self joins Content-Language: en-US To: Alexander Korotkov Cc: Andrei Lepikhov , "Gregory Stark (as CFM)" , =?UTF-8?Q?Micha=c5=82_K=c5=82eczek?= , PostgreSQL Hackers , Richard Guo References: <64486b0b-0404-e39e-322d-0801154901f3@postgrespro.ru> <1bd80083-a13e-4e9f-a7ce-73c3faab521c@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> From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 18.02.2024 19:18, Alexander Korotkov wrote: > Attached is a draft patch fixing this query. Could you, please, recheck? Yes, this patch fixes the behavior for that query (I've also tried several similar queries). Though I don't know the code well enough to judge the code change. Best regards, Alexander