Re: anyelement -> anyrange

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 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:47:11
Message-ID: 6b13eaae-2c63-87e0-2925-eebf80c63b4a@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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...
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532) mobile: 512-569-9461

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2016-08-16 23:56:47 Re: anyelement -> anyrange
Previous Message Thomas Munro 2016-08-16 23:41:54 Re: Server crash due to SIGBUS(Bus Error) when trying to access the memory created using dsm_create().