Re: Improve upcasting for INT range and multi range types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Federico <cfederico87(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Improve upcasting for INT range and multi range types
Date: 2023-12-13 04:16:27
Message-ID: 2529538.1702440987@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

jian he <jian(dot)universality(at)gmail(dot)com> writes:
> Based on my interpretation, I don't think SELECT 2::INT4 <@ '[1,
> 4)'::INT8RANGE is doable.

Yeah, it would require a considerable expansion of the scope of
what can be matched by a polymorphic operator. I'm afraid that
the negative consequences (mainly, "ambiguous operator" failures
because more than one thing can be matched) would outweigh the
benefits. It is kind of annoying though that the system can't
do the "obvious" right thing here.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2023-12-13 04:56:23 Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock
Previous Message jian he 2023-12-13 04:10:03 Re: Improve upcasting for INT range and multi range types