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

Re: Range Types, constructors, and the type system

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: Florian Pflug <fgp(at)phlo(dot)org>, 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 21:44:53
Message-ID: 1309383893.4921.2.camel@vanquo.pezone.net (view raw or flat)
Thread:
Lists: pgsql-hackers
On ons, 2011-06-29 at 10:15 -0700, David E. Wheeler wrote:
> On Jun 29, 2011, at 10:13 AM, Florian Pflug wrote:
> 
> > 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?
> 
> The one that corresponds to the current LC_COLLATE setting.

Yes, or more generally, we have logic that determines, for example, what
collation to use for

'foo' < 'foooo'

The same logic can be used to determine what collation to use for

range('foo', 'foooo')

(In fact, if you implement range() as a user-space function, that will
happen automatically.)



In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2011-06-29 22:16:20
Subject: Re: Re: starting to review the Extend NOT NULL representation to pg_constraint patch
Previous:From: Andrew DunstanDate: 2011-06-29 21:28:33
Subject: Re: default privileges wording

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