pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Paul Jungwirth <pj@illuminatedcomputing.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Jeff Davis <pgsql@j-davis.com>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: Re: range_agg
Date: Thu, 21 Nov 2019 12:15:28 -0800
Message-ID: <5b52f2f4-a0ec-76b1-8a73-98b8a7270bd6@illuminatedcomputing.com> (raw )
In-Reply-To: <CAFj8pRAUso-5-+f-q-nword4F=QZOZuJaKdaqH_y_Ybom+fYsg@mail.gmail.com >
References: <CA+renyWOSQ5P-=KCqti4WN1hdS9h9O5kFSvXqodq49XaR43HkA@mail.gmail.com >
<20190926211349.GA3375@alvherre.pgsql >
<CA+renyWY-vfLVM8NkHj11xXyCNYJA7=1sd5_Bk+B+DL66y6-WQ@mail.gmail.com >
<CA+renyW9KU=1mxyoNMuHPnBx4j5eFw+KKPgEMLcbKRUVekrPoA@mail.gmail.com >
<CAFj8pRCYd8O32UWC5ZRWOhioOx4Z=AOnr9VO8fSTq6mdW--zOw@mail.gmail.com >
<CA+renyXY4tY5vpw0Ha3xqPgL4PFz_uAWVMUCHWU4AQ4mTPp30A@mail.gmail.com >
<CA+renyVNd0mGfbO-i2akkcQE9YrwNzAjVLchAcBEFZF+fiyJQw@mail.gmail.com >
<CAFj8pRAUso-5-+f-q-nword4F=QZOZuJaKdaqH_y_Ybom+fYsg@mail.gmail.com >
On 11/21/19 1:06 AM, Pavel Stehule wrote:
> 2. I don't like introduction "safe" operators - now the basic operators
> are doubled, and nobody without documentation will use @* operators.
>
> It is not intuitive. I think is better to map this functionality to
> basic operators +- * and implement it just for pairs (Multirange,
> Multirange) and (Multirange, Range) if it is possible
>
> It's same relation line Numeric X integer. There should not be
> introduced new operators. If somebody need it for ranges, then he can
> use cast to multirange, and can continue.
> [snip]
> 3. There are not prepared casts -
>
> postgres=# select int8range(10,15)::int8multirange;
> ERROR: cannot cast type int8range to int8multirange
> LINE 1: select int8range(10,15)::int8multirange;
> ^
> There should be some a) fully generic solution, or b) possibility to
> build implicit cast when any multirange type is created.
Okay, I like the idea of just having `range + range` and `multirange +
multirange`, then letting you cast between ranges and multiranges. The
analogy to int/numeric seems strong. I guess if you cast a multirange
with more than one element to a range it will raise an error. That will
let me clean up the docs a lot too.
Thanks!
--
Paul ~{:-)
pj@illuminatedcomputing.com
view thread (152+ messages) latest in thread
Message-ID: <5b52f2f4-a0ec-76b1-8a73-98b8a7270bd6@illuminatedcomputing.com>
Permalink: ../5b52f2f4-a0ec-76b1-8a73-98b8a7270bd6@illuminatedcomputing.com/
Also on: postgresql.org/message-id/5b52f2f4-a0ec-76b1-8a73-98b8a7270bd6@illuminatedcomputing.com
copy link · copy postgr.es
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pj@illuminatedcomputing.com, pavel.stehule@gmail.com, alvherre@2ndquadrant.com, pgsql@j-davis.com
Subject: Re: range_agg
In-Reply-To: <5b52f2f4-a0ec-76b1-8a73-98b8a7270bd6@illuminatedcomputing.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