Re: ALTER TYPE COLLATABLE? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: ALTER TYPE COLLATABLE?
Date
Msg-id 1299098714.21461.27.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: ALTER TYPE COLLATABLE?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ALTER TYPE COLLATABLE?
List 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.




pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Sync Rep v17
Next
From: "Kevin Grittner"
Date:
Subject: Re: Sync Rep v17