From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Jeff Davis <pgsql(at)j-davis(dot)com> |
Subject: | Re: anyelement -> anyrange |
Date: | 2016-08-16 23:56:47 |
Message-ID: | CAKFQuwYWN3M7fv5ukV_LidpAqM6EgO9gaSVsvdmRsov3-Tpfkw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Aug 16, 2016 at 7:47 PM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
> On 8/15/16 10:12 PM, Tom Lane wrote:
>
>> Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> writes:
>>
>>> Any reason why we can create a function that accepts anyelement and
>>> returns anyarray, but can't do the same with anyrange?
>>>
>>
>> Because there can be more than one range type over the same element
>> type, so we couldn't deduce which one should be used for anyrange.
>>
>> The other direction (inferring anyelement from anyrange) does work.
>>
>
> Is there an actual use case for that? I'm not seeing what it would be...
https://www.postgresql.org/docs/9.5/static/functions-range.html
lower() and upper() both use it.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2016-08-17 00:03:22 | Re: [Patch] Temporary tables that do not bloat pg_catalog (a.k.a fast temp tables) |
Previous Message | Jim Nasby | 2016-08-16 23:47:11 | Re: anyelement -> anyrange |