move collation import to backend

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема move collation import to backend
Дата
Msg-id b78a8524-0412-5605-54d1-972b481eb16d@2ndquadrant.com
обсуждение исходный текст
Ответы Re: move collation import to backend  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Currently, initdb parses locale -a output to populate pg_collation.  If
additional collations are installed in the operating system, it is not
possible to repeat this process, only by doing each step manually.  So I
propose to move this to a backend function that can be called
separately, and have initdb call that.  Running this logic in the
backend instead of initdb also makes the code simpler.  If we add other
collation providers such as ICU, initdb doesn't need to know about that
at all, because all the logic would be contained in the backend.

Here is an example:

    select pg_import_system_collations(if_not_exists => false, schema =>
'test');

(Specifying the schema also allows testing this without overwriting
pg_catalog.)

I thought about making this a top-level command (IMPORT COLLATIONS ...
?) but decided against it for now, to keep it simple.  Right now, this
is more of a refactoring.  Documentation could be added if we decide so.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: "Tsunakawa, Takayuki"
Дата:
Сообщение: Re: [RFC] Should we fix postmaster to avoid slow shutdown?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: make coverage-html on OS X