Re: unnesting multirange data types

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
Cc: Zhihong Yu <zyu(at)yugabyte(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: unnesting multirange data types
Date: 2021-06-13 15:49:07
Message-ID: 20210613154907.GZ16435@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2021-06-13 15:58:47 Re: Fdw batch insert error out when set batch_size > 65535
Previous Message Bharath Rupireddy 2021-06-13 15:25:23 Re: Fdw batch insert error out when set batch_size > 65535