From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: range_agg |
Date: | 2019-12-20 19:29:01 |
Message-ID: | 20191220192901.GA9955@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2019-Dec-20, Paul A Jungwirth wrote:
> Is it permitted to add casts with polymorphic inputs & outputs? Is
> that something that we would actually want to do? I'd probably need
> both the polymorphic and concrete casts so that you could still say
> `int4range(1,2)::int4multirange`.
I'm embarrased to admit that I don't grok the type system well enough
(yet) to answer this question.
> Should I change the coerce code to look for casts among concrete types
> when the function has polymorphic types? I'm pretty scared to do
> something like that though, both because of the complexity and lest I
> cause unintended effects.
Yeah, I suggest to stay away from that. I think this multirange thing
is groundbreaking enough that we don't need to cause additional
potential breakage.
> Should I just give up on implicit casts and require you to specify
> one? That makes it a little more annoying to mix range & multirange
> types, but personally I'm okay with that. This is my preferred
> approach.
+1
> I have some time over the holidays to work on the other changes Alvaro
> has suggested.
I hope not to have made things worse by posting a rebase. Anyway,
that's the reason I posted my other changes separately.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-12-20 19:42:22 | Re: pgsql: Superuser can permit passwordless connections on postgres_fdw |
Previous Message | Paul A Jungwirth | 2019-12-20 19:20:28 | Re: range_agg |