Re: general purpose array_sort

From: Junwang Zhao <zhjwpku(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, "andreas(at)proxel(dot)se" <andreas(at)proxel(dot)se>
Subject: Re: general purpose array_sort
Date: 2024-11-07 14:51:51
Message-ID: CAEG8a3JUb+cTYfhyWVBcVGN0B51A0vz3bt8x6c57QOcN=8kPpA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 7, 2024 at 10:29 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Thu, Nov 7, 2024 at 8:56 AM Junwang Zhao <zhjwpku(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2024-11-07 15:02:58 Re: index prefetching
Previous Message Ilia Evdokimov 2024-11-07 14:49:23 Re: Vacuum statistics