Re: general purpose array_sort - Mailing list pgsql-hackers

From Junwang Zhao
Subject Re: general purpose array_sort
Date
Msg-id CAEG8a3JUb+cTYfhyWVBcVGN0B51A0vz3bt8x6c57QOcN=8kPpA@mail.gmail.com
Whole thread Raw
In response to Re: general purpose array_sort  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Thu, Nov 7, 2024 at 10:29 PM Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Thu, Nov 7, 2024 at 8:56 AM Junwang Zhao <zhjwpku@gmail.com> wrote:
> > Yeah, this is reasonable but one case I can't be sure:
> >
> > SELECT array_sort('{{2,3,4}}'::xid[]);
> >
> > This will return the array as is, but xid doesn't have a LT_OPR, should
> > I error out in this case? like:
> >
> > could not identify ordering operator for type xid[]
>
> Yes, I think that case needs to error out. It seems best to identify
> the ordering operator before you decide whether or not you have >1
> element.

Got it, will do this in the next version.

>
> --
> Robert Haas
> EDB: http://www.enterprisedb.com



--
Regards
Junwang Zhao



pgsql-hackers by date:

Previous
From: Ilia Evdokimov
Date:
Subject: Re: Vacuum statistics
Next
From: Tomas Vondra
Date:
Subject: Re: index prefetching