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 1rZS6R-004NdN-Vr for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Feb 2024 08:55:53 +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 1rZS6Q-0083Z6-HF for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Feb 2024 08:55:50 +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 1rZS6Q-0083Yx-32 for pgsql-hackers@lists.postgresql.org; Mon, 12 Feb 2024 08:55:50 +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 1rZS6H-006mRc-BX for pgsql-hackers@postgresql.org; Mon, 12 Feb 2024 08:55:49 +0000 Received: from [10.4.14.85] (unknown [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: a.rybakina@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 3477BE20E12; Mon, 12 Feb 2024 11:55:40 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1707728140; bh=YiztYuIWvb5wXA0ZdJPDotpGyLxiGSPNA1fmyd2gIrE=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=GITn5cu8LfGTEcZNlUpz2rtdiH1O85Po+ThcW9qrsj0cZEQD1dp2HIq9sLXoyoT/y 6HEtuOiAh3quD4GgrWA4dGpBSerHSNIgwzBK0MaRp5TPw5N0oJ8ip4xvYcF8qMyrrT 55C+hbejbu39Oo1N+NRg26OJa1Vlp0og0AbUzuE64E2ewyNcxKgOXXZb28UJsOE6IV VKTxtU7dq727pnLay+XtmLyu3lru+Xtg1eiV0+oZaFVYKjwSqUZGQ0qPaIeZw73KH0 b++GYC7SCdPHxxMjrr+xnqFcSKFi1OXfwetU8RFNVfXtLgPkH5Nw2UIarCxQuP08vX tZ1nfVr7PPTXg== Content-Type: multipart/alternative; boundary="------------Nxpu9F9TcGUx5i91T7w6CQ2T" Message-ID: <19f7795b-a31c-491f-ad2a-746f0dd3c7c8@postgrespro.ru> Date: Mon, 12 Feb 2024 11:55:40 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: POC, WIP: OR-clause support for indexes Content-Language: en-US To: Andrei Lepikhov 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> <04ef16eb-46c1-4ce7-9f68-d1c80ef0be81@postgrespro.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> From: Alena Rybakina In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------Nxpu9F9TcGUx5i91T7w6CQ2T Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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. -- Regards, Alena Rybakina Postgres Professional:http://www.postgrespro.com The Russian Postgres Company --------------Nxpu9F9TcGUx5i91T7w6CQ2T Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

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.

-- 
Regards,
Alena Rybakina
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--------------Nxpu9F9TcGUx5i91T7w6CQ2T--