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 1tqpo6-00Ayjk-Cu for pgsql-committers@arkaria.postgresql.org; Sat, 08 Mar 2025 08:45:18 +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 1tqpo5-00Ckqv-0o for pgsql-committers@arkaria.postgresql.org; Sat, 08 Mar 2025 08:45:17 +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 1tqpo4-00Ckkp-6Z for pgsql-committers@lists.postgresql.org; Sat, 08 Mar 2025 08:45:16 +0000 Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tqpnz-001egp-3B for pgsql-committers@lists.postgresql.org; Sat, 08 Mar 2025 08:45:15 +0000 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfhigh.stl.internal (Postfix) with ESMTP id E671C254012C; Sat, 8 Mar 2025 03:45:10 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Sat, 08 Mar 2025 03:45:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm3; t=1741423510; x=1741509910; bh=Y5Zdr606ZUAFxKP13BrZZIIItmOmHFDJ isCSJqrHOpE=; b=Kiis0+0oYBr33IS5RFX9u/wPZw7vfYsF2GYmazq0iwJsjUCu 14xx5qA4/zbKnqju2EphJIiFEJPks/UHsQTj2sy6tjh+mHIMrMKS0ihN1jkwkO89 s+CF0F/Myeh7JWcBEG+99N9HdKptVwjfis6SsiuMBVqo4oF2bJq14sJccbePv9Vn 4KCVHKIlz7NN2D6dLDdg+uVypjYgBv6EqEYHrjzdD3oH4WK26Vn4HuwH3KMLLkvE uKzapvXoeXpftkdVmdhkJNmTaqr3BdOYrJGQa1BOjmCqrLBA+krxfreJjnBQPEgQ plEh1Ar8SX6dAWlTfaxYI3ME6Zm7cmrGRqqZuQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1741423510; x= 1741509910; bh=Y5Zdr606ZUAFxKP13BrZZIIItmOmHFDJisCSJqrHOpE=; b=q Zn4ly1qt1l95PKHH4g6Ju4vpqMVmYvqXmdS1+lHHSLV/dVsUd7Fl/ax0Z0OhqpvH g7/l5rATuOeB/MXopF89yfKN1ymnYK7W6/1dMP3/Utwkvj3pIQV5tnqC73HK2RRL ybC9YB7DOCqrSiRSgIMxAJfxxT252J9m8ymcufATZ886sG81Bg1Ko+eK9wl/uWy8 UfFmdxSEIRzu6xHKrK24QKYE0IjbD6AvMH5QquUupvyA2xKVgOz0ybQGRogHwr2X /Ln5RrXSXh1G8hmL8v9wTXoDQV2i6BecnTkytK7a+SoOj7bPnibWw6XX3hemqhq0 M5MSywIS1Ul+eM01xFrAg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduudefuddtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddt vdejnecuhfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvih hsvghnthhrrghuthdrohhrgheqnecuggftrfgrthhtvghrnhepgfejtdfhkeeftdeugfei leehteeljeeghfeuledthfeutedvffdukeefjefhgeehnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhht rdhorhhgpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtth hopehtghhlsehsshhsrdhpghhhrdhprgdruhhspdhrtghpthhtohepmhgrrhhkrdguihhl ghgvrhesvghnthgvrhhprhhishgvuggsrdgtohhmpdhrtghpthhtohepphhgshhqlhdqtg homhhmihhtthgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 8 Mar 2025 03:45:09 -0500 (EST) Message-ID: <5d98c343-4d8e-4c10-bbfe-7f122065fc18@eisentraut.org> Date: Sat, 8 Mar 2025 09:45:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pgsql: Generalize hash and ordering support in amapi To: Tom Lane Cc: Mark Dilger , pgsql-committers@lists.postgresql.org References: <2557074.1740673653@sss.pgh.pa.us> <1789fe14-c19d-4025-9201-0eb8faa0840b@eisentraut.org> <165328.1741109742@sss.pgh.pa.us> <0f6a8a8a-b42e-433b-89cd-ee121d0919b3@eisentraut.org> <1113684.1741373446@sss.pgh.pa.us> Content-Language: en-US From: Peter Eisentraut In-Reply-To: <1113684.1741373446@sss.pgh.pa.us> 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 07.03.25 19:50, Tom Lane wrote: > Peter Eisentraut writes: >> I have committed fixes for these issues along the lines you suggested. > > Thanks. There is a typo in hashhandler: > > - amroutine->amcancrosscompare = true; > + amroutine->amconsistentequality = true; > + amroutine->amconsistentequality = false; > > The second line should be setting amconsistentordering = false. > > Also, may I suggest one more thing? I think the test in > comparison_ops_are_compatible should be just > > - if (amroutine->amcanorder && amroutine->amconsistentordering) > + if (amroutine->amconsistentordering) > > (and the comment for it needs adjustment too). To my mind, > amconsistentordering is a static declaration that operators > within one of the AM's opfamilies are expected to have this > property. That could be true whether or not the AM is capable > of returning tuples in order. So although these flags might > commonly be set together, I think they are independent > properties. Agreed, done.