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

collation, arrays, and ranges

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: collation, arrays, and ranges
Date: 2011-09-10 16:51:12
Message-ID: 1315673472.7281.67.camel@jdavis (view raw or flat)
Thread:
Lists: pgsql-hackers
My interpretation of collation for range types is different than that
for arrays, so I'm presenting it here in case someone has an objection.

An array type has the same typcollation as its element type. This makes
sense, because comparison between arrays are affected by the COLLATE
clause.

Comparison between ranges should not be affected by the COLLATE clause
(as we discussed). So, I chose to represent that as a separate
rngcollation and leave the typcollation 0. In other words, collation is
a concept internal to that range type and fixed at type definition time.
Range types are affected by their internal collation, but don't take
part in the logic that passes collation through the type system.

Comments?

Regards,
	Jeff Davis




Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-09-10 17:14:01
Subject: Re: WARNING: pgstat waiting
Previous:From: Jeff DavisDate: 2011-09-10 16:50:40
Subject: collation, arrays, and ranges

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