Re: collation, arrays, and ranges

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: collation, arrays, and ranges
Date: 2011-09-10 18:06:42
Message-ID: 1315678002.7281.71.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2011-09-10 at 13:21 -0400, Tom Lane wrote:
> > 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.
>
> Should I read that as saying you want to add yet another column to
> pg_type? I'd prefer not to do that. Seems to me we could still store
> the value in typcollation, but just interpret the column a bit
> differently depending on typtype.

I added the column to pg_range (rngcollation), which seemed a little
less invasive than either of the other options (either adding a new
column to pg_type or overloading the existing one).

I was worried about having the same column in pg_type mean two different
things -- every caller of get_typcollation would need to be careful.

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andy Colson 2011-09-10 19:26:32 Re: REVIEW proposal: a validator for configuration files
Previous Message Tom Lane 2011-09-10 17:21:19 Re: collation, arrays, and ranges