Re: BUG #17066: Cache lookup failed when null (unknown) is passed as anycompatiblemultirange

Alexander Korotkov <aekorotkov@gmail.com>

From: Alexander Korotkov <aekorotkov@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Neil Chen <carpenter.nail.cz@gmail.com>, Alexander Law <exclusion@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>, Paul A Jungwirth <pj@illuminatedcomputing.com>
Date: 2021-06-29T22:06:34Z
Lists: pgsql-bugs
On Thu, Jun 24, 2021 at 2:35 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Alexander Korotkov <aekorotkov@gmail.com> writes:
> > I really appreciate a hint here.
>
> I think I'm to blame for most of that code originally, so I'll take
> a look soon.  Been up to my neck in other stuff recently.

Do I understand correctly that enforce_generic_type_consistency() is
called only after check_generic_type_consistency() returned true?

If so, that means some of the checks are redundant.  Therefore, we can
replace ereport()'s with Assert()'s.

------
Regards,
Alexander Korotkov



Commits

  1. Fix bugs in polymorphic-argument resolution for multiranges.

  2. Fixes for multirange selectivity estimation