From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add CREATE DATABASE LOCALE option
Date: 2019-06-14 09:57:58
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 05/06/2019 23:17, Peter Eisentraut wrote:
> I propose this patch to add a LOCALE option to CREATE DATABASE. This
> sets both LC_COLLATE and LC_CTYPE with one option. Similar behavior is
> already supported in initdb, CREATE COLLATION, and createdb.
> With collation providers other than libc, having separate lc_collate and
> lc_ctype settings is not necessarily applicable, so this is also
> preparation for such future functionality.

One objection is that the proposed LOCALE option would only affect
LC_COLLATE and LC_CTYPE. What about lc_messages, lc_monetary, lc_numeric
and lc_time? initdb's --locale option sets those, too. Should CREATE
DATABASE LOCALE set those as well?

On the whole, +1 on adding the option. In practice, you always want to
set LC_COLLATE and LC_CTYPE to the same value, so we should make that
easy. But let's consider those other variables too, at least we've got
to document it carefully.

PS. There was some discussion on doing this when the LC_COLLATE and
LC_CTYPE options were added:
My reading of that is that there was no strong consensus, so we just let
it be.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2019-06-14 10:34:36 Re: pg_upgrade: Improve invalid option handling
Previous Message Christoph Berg 2019-06-14 09:55:46 Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)