From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Szilfai Balázs <balazs(at)obiserver(dot)hu> |
Cc: | "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14854: daterange[] is an anyarray or anyrange? |
Date: | 2017-10-13 20:52:29 |
Message-ID: | CAKFQuwZUWHomK4E=nt_sErPMSnY7TQsmwMrwTFEz1eLtfTO=yQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, Oct 13, 2017 at 1:42 PM, Szilfai Balázs <balazs(at)obiserver(dot)hu> wrote:
> Thanks a lot!
>
> Ok, the (daterange, date[]) invocation is working now with (anyelement,
> anyarray) param list.
>
I assume you meant (daterate, daterange[])
But now is working with eg. (date, date[]) invocation. I can't forbid it
> anyway?
>
No. It also matches (text, text[]) and "(integer, integer[])". The best
you can do is detect non-range values in the first argument and raise an
exception. Or define explicitly typed functions for the variants you care
about and drop the polymorphism.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-10-13 22:28:15 | Re: BUG #14854: daterange[] is an anyarray or anyrange? |
Previous Message | Szilfai Balázs | 2017-10-13 20:42:27 | Re: BUG #14854: daterange[] is an anyarray or anyrange? |