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

Re: Why so few built-in range types?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Why so few built-in range types?
Date: 2011-11-30 18:20:35
Message-ID: 24531.1322677235@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> On Tue, 2011-11-29 at 12:01 -0500, Tom Lane wrote:
>> In particular, I don't understand why there's not a
>> standard float8range type; that seems like a pretty common case.
>> I'd have also expected to see a standard textrange type.  What was
>> the rationale for leaving these out?

> A built-in textrange type would have to have collation "C", right? Do
> you think that would be useful to enough people?

No, its collation could be set to "default", which would match the
database's LC_COLLATE setting.  Probably the more interesting
implementation problem is to come up with a subtype_diff function ...

> One that I'd like to see is an IP address type, but that's complicated
> because inet and cidr support netmasks.

Yeah, it's not clear what if anything to do with the netmask.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2011-11-30 18:21:54
Subject: Re: review: CHECK FUNCTION statement
Previous:From: Greg StarkDate: 2011-11-30 18:20:18
Subject: Re: Word-smithing doc changes

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