Re: general purpose array_sort

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Junwang Zhao <zhjwpku@gmail.com>, Aleksander Alekseev <aleksander@timescale.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>, "David G. Johnston" <david.g.johnston@gmail.com>, jian he <jian.universality@gmail.com>, Amit Langote <amitlangote09@gmail.com>, "andreas@proxel.se" <andreas@proxel.se>
Date: 2024-11-08T00:01:20Z
Lists: pgsql-hackers
On Thu, Nov 07, 2024 at 09:29:05AM -0500, Robert Haas wrote:
> 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.

+1.
--
Michael

Commits

  1. Introduce a SQL-callable function array_sort(anyarray).

  2. Fix ARRAY_SUBLINK and ARRAY[] for int2vector and oidvector input.

  3. Re-implement the ereport() macro using __VA_ARGS__.