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

Re: Range Types, constructors, and the type system

From: Florian Pflug <fgp(at)phlo(dot)org>
To: David E(dot) Wheeler <david(at)kineticode(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Range Types, constructors, and the type system
Date: 2011-06-29 17:13:55
Message-ID: 6A92A4E6-9176-4713-8121-EA3342927656@phlo.org (view raw or flat)
Thread:
Lists: pgsql-hackers
On Jun29, 2011, at 19:05 , David E. Wheeler wrote:
> I'm still not clear, though, on why the return type of range()
> should not be related to the types of its arguments. So
> 
>    range(1, 5)
> 
> Should return intrange, and
> 
>    range(1::int8, 5::int8)
> 
> Should return int8range, and
> 
>    range('foo', 'foooo')
> 
> Should return textrange.

Because there might be more than one range type for a
base type. Say there are two range types over text, one
with collation 'de_DE' and one with collation 'en_US'.
What would the type of
  range('foo', 'foooo')
be?

best regards,
Florian Pflug


In response to

Responses

pgsql-hackers by date

Next:From: David E. WheelerDate: 2011-06-29 17:15:05
Subject: Re: Range Types, constructors, and the type system
Previous:From: Florian PflugDate: 2011-06-29 17:11:52
Subject: Re: Range Types, constructors, and the type system

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