> On 4 Jan 2025, at 10:24, John Naylor <johncnaylo...@gmail.com> wrote:
> 
> v6-0001:
> 
> +static int
> +unique_cmp(const void *a, const void *b)
> +{
> + int32 aval = *((const int32 *) a);
> + int32 bval = *((const int32 *) b);
> +
> + return pg_cmp_s32(aval, bval);
> +}
> 
> I'm not sure it makes sense to create a whole new function for this,
> when the same patch removed:
> 
> -int
> -compASC(const void *a, const void *b)
> -{
> - return pg_cmp_s32(*(const int32 *) a, *(const int32 *) b);
> -}
> 
> ...which in effect the exact same thing.
> 
> Otherwise seems close to committable.

I thought about it, but decided to rename the routine.
Here's a version 7 with compASC().
And, just in case, if we already have ASC, why not keep DESC too instead of 
newly invented cmp function :) PFA v8.

Thanks!


Best regards, Andrey Borodin.

Attachment: v7-0001-Use-specialized-sort-facilities.patch
Description: Binary data

Attachment: v8-0001-Use-specialized-sort-facilities.patch
Description: Binary data

Reply via email to