Re: [PATCH] Simplify SortSupport implementation for macaddr

Aleksander Alekseev <aleksander@tigerdata.com>

From: Aleksander Alekseev <aleksander@tigerdata.com>
To: PostgreSQL Development <pgsql-hackers@postgresql.org>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>, John Naylor <johncnaylorls@gmail.com>
Date: 2026-03-09T13:08:06Z
Lists: pgsql-hackers

Attachments

Hi Andrey,

Many thanks for your feedback!

> 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.

-- 
Best regards,
Aleksander Alekseev

Commits

  1. Simplify SortSupport for the macaddr data type