Re: Range Types, constructors, and the type system - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: Range Types, constructors, and the type system
Date
Msg-id 6A92A4E6-9176-4713-8121-EA3342927656@phlo.org
Whole thread Raw
In response to Re: Range Types, constructors, and the type system  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: Range Types, constructors, and the type system
List 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



pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: Range Types, constructors, and the type system
Next
From: "David E. Wheeler"
Date:
Subject: Re: Range Types, constructors, and the type system