Re: to be a multirange or not be, that's the question

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: to be a multirange or not be, that's the question
Date: 2021-11-07 06:54:00
Message-ID: CAKFQuwZLmmpaB_08+vE48YLSbk6e+tGCrLUh+rE2D2Q9X_kL_w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Saturday, November 6, 2021, Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
wrote:

> Ok, subject was a bit philosophical but this message I just found is
> quite confusing.
>
> """
> regression=# select cast(null as anyrange) &> cast(null as anymultirange);
> ERROR: argument declared anymultirange is not a multirange type but type
> anymultirange
> """
>
>
I get that it is hard to parse but it is unambiguously correct. It does
seem to presume that one understands how polymorphic pseudo-types work (the
supplied query was written without that knowledge applied). I can envision
some improvements here though it would depend a lot on the actual
implementation. I’m also curious as to why we get as far the operator
invocation when casting literals to polymorphic pseudo-types is supposedly
an invalid thing to do.

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2021-11-07 07:23:01 Re: [PROPOSAL] new diagnostic items for the dynamic sql
Previous Message Jaime Casanova 2021-11-07 06:17:57 to be a multirange or not be, that's the question