Re: Add CREATE DATABASE LOCALE option
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-06-14T09:57:58Z
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: https://www.postgresql.org/message-id/491862F7.1060501%40enterprisedb.com. My reading of that is that there was no strong consensus, so we just let it be. - Heikki
Commits
-
Add CREATE DATABASE LOCALE option
- 06140c201b98 13.0 landed