Re: unnesting multirange data types - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: unnesting multirange data types
Date
Msg-id 20210613154907.GZ16435@telsasoft.com
Whole thread Raw
In response to Re: unnesting multirange data types  ("Jonathan S. Katz" <jkatz@postgresql.org>)
Responses Re: unnesting multirange data types
List pgsql-hackers
On Sun, Jun 13, 2021 at 11:25:05AM -0400, Jonathan S. Katz wrote:
> On 6/13/21 10:57 AM, Zhihong Yu wrote:
> > +/* Turn multirange into a set of ranges */
> > 
> > set of ranges: sequence of ranges
> 
> I believe "set of ranges" is accurate here, as the comparable return is
> a "SETOF rangetype". Sequences are objects unto themselves.
> 

I believe the point was that (in mathematics) a "set" is unordered, and a
sequence is ordered.  Also, a "setof" tuples in postgres can contain
duplicates.

The docs say "The ranges are read out in storage order (ascending).", so I
think this is just a confusion between what "set" means in math vs in postgres.

In postgres, "sequence" usually refers to the object that generarates a
sequence:
| CREATE SEQUENCE creates a new sequence number generator.

-- 
Justin



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Fdw batch insert error out when set batch_size > 65535
Next
From: Tomas Vondra
Date:
Subject: Re: Fdw batch insert error out when set batch_size > 65535