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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

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