Re: Add CREATE DATABASE LOCALE option

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Add CREATE DATABASE LOCALE option
Дата
Msg-id c30f4743-1c81-0d78-66b8-d190daf49c27@iki.fi
обсуждение исходный текст
Ответ на Add CREATE DATABASE LOCALE option  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christoph Berg
Дата:
Сообщение: Re: UCT (Re: pgsql: Update time zone data files to tzdata release2019a.)
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: pg_upgrade: Improve invalid option handling