Re: unnest multirange, returned order

Laurenz Albe <laurenz.albe@cybertec.at>

From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Daniel Fredouille <daniel.fredouille@gmail.com>
Cc: pgsql-docs@lists.postgresql.org
Date: 2023-10-05T06:50:24Z
Lists: pgsql-hackers, pgsql-docs

Attachments

On Wed, 2023-10-04 at 20:12 -0400, Daniel Fredouille wrote:
> unnest ( anymultirange ) → setof anyrange
> Expands a multirange into a set of ranges. The ranges are read out in storage order (ascending) and therefore order cannot be relied upon.

That's not true.  The order is deterministic and can be relied on.

How about the attached patch, which does away with the confusing
mention of "storage order"?

Yours,
Laurenz Albe

Commits

  1. Clarify the result order of unnest(multirange).