Skip site navigation (1) Skip section navigation (2)

Re: casting between range types

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: casting between range types
Date: 2011-08-31 15:09:15
Message-ID: 1314803355.7281.3.camel@jdavis (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, 2011-08-31 at 09:20 +0300, Heikki Linnakangas wrote:
> On 31.08.2011 09:14, Jeff Davis wrote:
> > First, a range is really a set. So if we take '[1,10)'::int4range and
> > cast that to numrange, we end up moving from a set of exactly 9 elements
> > to a set of an infinite number of elements. Going the other way is
> > probably worse.

...

> Can you only provide casts that make sense, like between int4 and 
> numeric range types, and leave out the ones that don't?

There are certainly some casts that make sense, like
int4range->int8range. Do you think int4range->numrange also makes sense?

Regards,
	Jeff Davis


In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2011-08-31 15:20:13
Subject: rename index fields bug
Previous:From: Joe AbbateDate: 2011-08-31 14:42:44
Subject: Re: Comparing two PostgreSQL databases -- order of pg_dump output

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group