Re: ALTER TYPE COLLATABLE?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ALTER TYPE COLLATABLE?
Date: 2011-03-02 20:45:14
Message-ID: 1299098714.21461.27.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On tis, 2011-03-01 at 16:31 -0500, Tom Lane wrote:
> I can't say that this makes me think any better of the design here.
> If a boolean true/false is a sufficient representation of a type's
> collation property, why isn't the column in pg_type just a boolean?
> If the idea of storing an OID is to allow reference to a choice of
> collations, why are we painting ourselves into a corner by dumping
> it as a boolean?

The same column is used for base types, which can only have default
collation or nothing, and domains, which can have any collation. We
could of course also have two separate columns, one typcollatable
boolean, and the typcollation only used by domains, and an earlier patch
had that, but as it turned out the code that ends up using this is
simplest if there is only one column. We could also (probably) support
arbitrary nondefault collations on base types, but that sounds a bit
odd, so I wouldn't want to support it yet unless there is a real use
case.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-03-02 20:45:46 Re: Sync Rep v17
Previous Message Andrew Dunstan 2011-03-02 20:44:44 Re: Sync Rep v17