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.96) (envelope-from ) id 1vyD2U-00HXGm-2V for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Mar 2026 18:03:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vyD2T-000Zwu-0g for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Mar 2026 18:03:09 +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.96) (envelope-from ) id 1vyD2S-000Zwm-2Z for pgsql-hackers@lists.postgresql.org; Thu, 05 Mar 2026 18:03:09 +0000 Received: from forwardcorp1a.mail.yandex.net ([2a02:6b8:c0e:500:1:45:d181:df01]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vyD2Q-00000000ZRv-01rL for pgsql-hackers@postgresql.org; Thu, 05 Mar 2026 18:03:08 +0000 Received: from mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net [IPv6:2a02:6b8:c2d:3530:0:640:eca4:0]) by forwardcorp1a.mail.yandex.net (Yandex) with ESMTPS id 55D76C01F0; Thu, 05 Mar 2026 21:02:57 +0300 (MSK) Received: from smtpclient.apple (unknown [2a02:6bf:8080:8a8::1:27]) by mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id t2uFEO0GW4Y0-u38NMkr0; Thu, 05 Mar 2026 21:02:56 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1772733777; bh=ljhkH5hpVdOWHOcjxmSu3zkA1S66hRRkLFc7QbflLiU=; h=Message-Id:To:Date:References:Cc:In-Reply-To:From:Subject; b=oO7+pPJx8tTKY2WzKRV4+j4A0RZbPGvEWQFXNRzxxONnq4QF8fwlym+ONNhXLIsfw eaFLBi5ZdNRDksVM+KyC0NXQAcO9s4rikJBnnfS3QVvgxs9dy0b3yEE5chrAsOnMxh xbvdTC03fc0YG77KhlAtqPzBNsdgNZbPlG4mlgQo= Authentication-Results: mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.300.41.1.7\)) Subject: Re: [PATCH] Simplify SortSupport implementation for macaddr From: Andrey Borodin In-Reply-To: Date: Thu, 5 Mar 2026 23:02:45 +0500 Cc: PostgreSQL Development , John Naylor Content-Transfer-Encoding: quoted-printable Message-Id: <932CBCA0-FF4B-406E-9296-1B8A63C3EB49@yandex-team.ru> References: To: Aleksander Alekseev X-Mailer: Apple Mail (2.3864.300.41.1.7) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 25 Feb 2026, at 18:05, Aleksander Alekseev = wrote: >=20 > The patch looks correct and useful to me. Two small points: 1. The assignment ssup->ssup_extra =3D NULL can be removed. The SortSupport struct is zeroed before the callback is called (see sortsupport.h). There are about 22 similar assignments elsewhere; it does not seem to be established practice, many other places have no such assignment. 2. I checked whether the existing tests actually use the SortSupport path. If macaddr_abbrev_abort() is made to error out, the macaddr.sql tests fail in two places: once for the index and once for the SELECT. So the current test file does exercise the SortSupport code path. I also tried making macaddr_abbrev_abort() always return true (so abbreviation is always aborted); the test dataset is small, but sorting seem to produce correct results. The patch looks good to me. Best regards, Andrey Borodin.=