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 1rZSCQ-004OLt-BC for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Feb 2024 09:02:03 +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 1rZSCO-0086bi-Ue for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Feb 2024 09:02:00 +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.94.2) (envelope-from ) id 1rZSCO-0086ba-GY for pgsql-hackers@lists.postgresql.org; Mon, 12 Feb 2024 09:02:00 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rZSCL-006mVJ-UU for pgsql-hackers@postgresql.org; Mon, 12 Feb 2024 09:01:59 +0000 Received: from [172.30.0.166] (unknown [172.30.0.166]) (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 A45FEE20E24; Mon, 12 Feb 2024 12:01:53 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1707728516; bh=z1KLTcAjwHEgFvZ/YRRRAefw9G6r3wvNBzbT5AhxG5Y=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=BRZYCIta3jUtQOoAlQ55esbyMFFaUBZsa9UpL7Xr0G029d/9cs7+dtCupnAqMSsD8 ImxUNrr0i6wWmcTu1KiF3eNqjHfyFlM6odqLzPeTV09ZRvN0nmg4fsV0QRJL00uOmP Xdd0sFZaQKz4IrfAttjazLmiR5HsGbfKhirMT0BUOeoIvm6aJv8kGOtNnYJe/5xXa7 iJF43htvmOw0JbqzbIzDQMmdWNU95gF0T4BFHYdFS2Tus3RB3CfYR1ESrZL5NEKNdL 7QA1MQxsf7X/PkZVHJLZZGnimJ6BXVKFTWlglaKF2B005/K4cFi8i/mDMko42YhsEO KiREcYMUEXseA== Message-ID: Date: Mon, 12 Feb 2024 16:01:50 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: POC, WIP: OR-clause support for indexes Content-Language: en-US To: Alena Rybakina Cc: Alexander Korotkov , Robert Haas , pgsql-hackers@postgresql.org, Peter Geoghegan , "Finnerty, Jim" , Marcos Pegoraro , teodor@sigaev.ru, Ranier Vilela , Tomas Vondra , Peter Eisentraut , jian he References: <567ED6CA.2040504@sigaev.ru> <59e67a40-95a8-4d74-ae4e-027ea0f59084@postgrespro.ru> <59b77a8a-29d6-4727-bf26-4a30a6a9719a@postgrespro.ru> <32d23d97-d07f-4d44-9933-ba3295fb3ed8@postgrespro.ru> <7e11e27b-7ab9-4d59-af0a-a921861a9206@postgrespro.ru> <13ad923a-33df-4b44-9e00-c9323cd4c37d@postgrespro.ru> <19f7795b-a31c-491f-ad2a-746f0dd3c7c8@postgrespro.ru> From: Andrei Lepikhov Organization: Postgres Professional In-Reply-To: <19f7795b-a31c-491f-ad2a-746f0dd3c7c8@postgrespro.ru> 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 On 12/2/2024 15:55, Alena Rybakina wrote: > Hi! > > I can't unnderstand this part of code: > > /* Time to generate index paths */ > > MemSet(&clauseset, 0, sizeof(clauseset)); > match_clauses_to_index(root, list_make1(rinfo1), index, &clauseset); > > As I understand it, match_clauses_to_index is necessary if you have a > RestrictInfo (rinfo1) variable, so maybe we should run it after the > make_restrictonfo procedure, otherwise calling it, I think, is useless. I think you must explain your note in more detail. Before this call, we already called make_restrictinfo() and built rinfo1, haven't we? -- regards, Andrei Lepikhov Postgres Professional