Re: [PATCH] Simplify SortSupport implementation for macaddr

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, John Naylor <johncnaylorls(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [PATCH] Simplify SortSupport implementation for macaddr
Date: 2026-03-25 08:00:04
Message-ID: acOWBAZpGw6XLThN@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 09, 2026 at 04:08:06PM +0300, Aleksander Alekseev wrote:
>> 1. The assignment ssup->ssup_extra = 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.
>
> Agree. I removed this assignment in 0001 and added 0002 that removes
> if for the rest of *_sortsupport() functions.

Sounds sensible to get rid of the estimation with the Datum size
requirement and never give up with the abbreviated key sort, as done
in 0001. I'd leave the code touched by 0002 remain as-is.

@Tom, why didn't you consider that as a continuation of 6aebedc38497?
Just to keep the changes with SIZEOF_DATUM < 8 leaner, or just because
it was not worth bothering based on your TODO list? I am wondering if
there is a reason I may be missing here.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-03-25 08:02:19 Re: Remove unused at_sharedrel from autovac_table
Previous Message Yugo Nagata 2026-03-25 07:57:34 Remove unused at_sharedrel from autovac_table