Re: per-database locale: createdb switches - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: per-database locale: createdb switches
Date
Msg-id 20090113160017.GD4005@alvh.no-ip.org
Whole thread Raw
In response to Re: per-database locale: createdb switches  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: per-database locale: createdb switches  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Heikki Linnakangas wrote:
> Peter Eisentraut wrote:

>> I notice in the documentation that the createdb --lc-ctype sets the  
>> lc_ctype setting for the database, but the corresponding parameter for  
>> CREATE DATABASE is CTYPE, but the global GUC setting is lc_ctype. 
>> Should that be more consistent?
>
> Hmm, I remember I pondered for a long time if it should be COLLATE and  
> CTYPE or LC_COLLATE and LC_CTYPE. I think the rationale in the end was  
> that a) COLLATE/CTYPE looks nicer and b) if we add support for ICU or  
> some other collation implementation, the association with LC_*  
> environment variables becomes misleading.
>
> Being consistent would be nice, though.

I think consistency could be reached by renaming the GUC setting to
ctype.  We could add a "lc_ctype" synonym for backwards compatibility
(like sort_mem) -- or maybe not.

Since the createdb setting is new as of 8.4, we should just rename that
to ctype as well.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: per-database locale: createdb switches
Next
From: "Kevin Grittner"
Date:
Subject: Re: [BUGS] Status of issue 4593