| From: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
|---|---|
| To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
| Cc: | Neil Chen <carpenter(dot)nail(dot)cz(at)gmail(dot)com>, Alexander Law <exclusion(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com> |
| Subject: | Re: BUG #17066: Cache lookup failed when null (unknown) is passed as anycompatiblemultirange |
| Date: | 2021-06-23 22:41:42 |
| Message-ID: | CAPpHfduRX=mft=30bcTmzPKm859Pjwpqk7TTkEy-6GddUxTpFA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Wed, Jun 23, 2021 at 6:31 PM Alexander Korotkov <aekorotkov(at)gmail(dot)com> wrote:
> On Tue, Jun 22, 2021 at 7:01 PM Alexander Korotkov <aekorotkov(at)gmail(dot)com> wrote:
> > On Tue, Jun 22, 2021 at 4:42 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> > > On 2021-Jun-22, Neil Chen wrote:
> > >
> > > > Greetings,
> > > >
> > > > I tried to investigate the bug, but the complicated logic here completely
> > > > messed up my mind...
> > > >
> > > > Anyway, this patch can fix it and make the regress test happy. But I think
> > > > it's better to get the author's advice - I copied this email to Alvaro,
> > > > hope it doesn't offend him...
> > >
> > > Without looking too deeply, the patch seems sensible to me. However,
> > > I'm CC'ing Alexander and Paul :-)
> >
> > Thank you for pointing this out. And thanks to Neil for the fix.
> >
> > Looks good at the first glance. I'm going to review this in the next
> > couple of days.
>
> I've reviewed enforce_generic_type_consistency() more carefully. It
> looks for me that this function requires more significant rework. For
> instance, these two functions throw errors, but it seems that both of
> them should work.
>
> create function multirange_func(r anycompatiblerange)
> returns anycompatiblemultirange as 'select multirange($1);' language sql;
> create function range_func(r anycompatiblemultirange)
> returns anycompatiblerange as 'select multirange($1);' language sql;
>
> # select multirange_func(int4range(1,10));
> ERROR: could not identify anycompatiblemultirange type
>
> # select range_func(int4multirange(int4range(1,10)));
> ERROR: could not determine polymorphic type anycompatiblerange
> because input has type unknown
>
> So, I'm still investigating this.
The second function was intended to be this to be a meaningful
example. But anyway it fails with the same error.
create function range_func(r anycompatiblemultirange)
returns anycompatiblerange as 'select range_merge($1);' language sql;
------
Regards,
Alexander Korotkov
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexander Korotkov | 2021-06-23 23:02:52 | Re: BUG #17066: Cache lookup failed when null (unknown) is passed as anycompatiblemultirange |
| Previous Message | Thomas Munro | 2021-06-23 22:29:15 | Re: Unicode FFFF Special Codepoint should always collate high. |