Re: general purpose array_sort - Mailing list pgsql-hackers

From Junwang Zhao
Subject Re: general purpose array_sort
Date
Msg-id CAEG8a3LUu3O8KPPWV0naaKyXFXMv9qhEuRf1TYKt7p9cLOYvRg@mail.gmail.com
Whole thread Raw
In response to Re: general purpose array_sort  (Aleksander Alekseev <aleksander@timescale.com>)
List pgsql-hackers
On Fri, Oct 25, 2024 at 1:19 AM Aleksander Alekseev
<aleksander@timescale.com> wrote:
>
> Hi,
>
> > I can accept this outcome though an optional three-valued boolean sort order (ascending and descending only) I'd
argueis worth keeping.  null value placement too I guess, three-valued boolean (nulls_first). 
>
> Perhaps these optional arguments deserve separate discussions. I
> suggest merging something everyone agrees on first. This will simplify
> the review process and allow us to deliver value to the users quickly.
> Arguments like `reverse => true` and `nulls_first => true` can always
> be implemented and added as separate patches.

As this patch uses the tuplesort infrastructure, we need to supply the
sortOperator, sortCollation and nullsFirstFlag, I tend to agree with
David. I admit that the parsing part is not good, so I will remove it
by using two boolean parameters Jian suggested earlier.

Will send out another version by tomorrow.

>
> --
> Best regards,
> Aleksander Alekseev



--
Regards
Junwang Zhao



pgsql-hackers by date:

Previous
From: "Andrey M. Borodin"
Date:
Subject: Re: Using read_stream in index vacuum
Next
From: Melanie Plageman
Date:
Subject: Re: Docs Build in CI failing with "failed to load external entity"