pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Jonathan S. Katz <jkatz@postgresql.org>
Cc: Zhihong Yu <zyu@yugabyte.com>
Cc: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: unnesting multirange data types
Date: Sun, 13 Jun 2021 10:49:07 -0500
Message-ID: <20210613154907.GZ16435@telsasoft.com> (raw)
In-Reply-To: <e60c3955-7fde-8007-e0d4-685776150a91@postgresql.org>
References: <CAPpHfds8F7Oh2H5jGQ5+K1A8DjjxmSx-1VJ1F1VVyAP_eazPvQ@mail.gmail.com>
<20210610220416.GJ16435@telsasoft.com>
<CAPpHfdufDWMVX5xjOv8LV-s0e4=QUt2P+Gksb8cWi6yjtEZPgA@mail.gmail.com>
<20210611233017.GO16435@telsasoft.com>
<CAPpHfdsrAZoJm08wi5k76Gd3FEAa3HprFJG-TzSoC3UHfEQ=QQ@mail.gmail.com>
<CAPpHfdtwVh4b-7vnjg0fV6AR0tPX6hUVgQY0CPG--j78_7uVDA@mail.gmail.com>
<3648e50c-eb0d-4d16-7194-1a1c62893726@postgresql.org>
<CAPpHfdsbQPb6OVpW_XSFfR8fAOCXaaOX+1WrXEZXHUDXp7i4uw@mail.gmail.com>
<CALNJ-vTFcG=jen6gf1XZYnOSVVHpBys2R_X-q_4bu4siYUzUdg@mail.gmail.com>
<e60c3955-7fde-8007-e0d4-685776150a91@postgresql.org>
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
view thread (66+ messages) latest in thread
Message-ID: <20210613154907.GZ16435@telsasoft.com> Permalink: ../20210613154907.GZ16435@telsasoft.com/ Also on: postgresql.org/message-id/20210613154907.GZ16435@telsasoft.com ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-hackers@postgresql.org Cc: pryzby@telsasoft.com, jkatz@postgresql.org, zyu@yugabyte.com, aekorotkov@gmail.com, alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us Subject: Re: unnesting multirange data types In-Reply-To: <20210613154907.GZ16435@telsasoft.com> References: <CAPpHfds8F7Oh2H5jGQ5+K1A8DjjxmSx-1VJ1F1VVyAP_eazPvQ@mail.gmail.com> <20210610220416.GJ16435@telsasoft.com> <CAPpHfdufDWMVX5xjOv8LV-s0e4=QUt2P+Gksb8cWi6yjtEZPgA@mail.gmail.com> <20210611233017.GO16435@telsasoft.com> <CAPpHfdsrAZoJm08wi5k76Gd3FEAa3HprFJG-TzSoC3UHfEQ=QQ@mail.gmail.com> <CAPpHfdtwVh4b-7vnjg0fV6AR0tPX6hUVgQY0CPG--j78_7uVDA@mail.gmail.com> <3648e50c-eb0d-4d16-7194-1a1c62893726@postgresql.org> <CAPpHfdsbQPb6OVpW_XSFfR8fAOCXaaOX+1WrXEZXHUDXp7i4uw@mail.gmail.com> <CALNJ-vTFcG=jen6gf1XZYnOSVVHpBys2R_X-q_4bu4siYUzUdg@mail.gmail.com> <e60c3955-7fde-8007-e0d4-685776150a91@postgresql.org> <20210613154907.GZ16435@telsasoft.com> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox