How to Change collate & ctype for an existing database?

Поиск
Список
Период
Сортировка
От Daulat Ram
Тема How to Change collate & ctype for an existing database?
Дата
Msg-id BY5PR01MB58437AB6BCA55E54A99282C09B540@BY5PR01MB5843.prod.exchangelabs.com
обсуждение исходный текст
Ответы Re: How to Change collate & ctype for an existing database?  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-general

Hi,

How we can change the   Collate &  Ctype from “c”  to  “C.UTF-8” on existing production database.

SELECT datcollate FROM pg_database WHERE datname='wwkidbt';

datcollate

------------

C

postgres=# select version();

                                                 version

----------------------------------------------------------------------------------------------------------

PostgreSQL 9.5.6 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.3.1-14ubuntu2) 5.3.1 20160413, 64-bit

 

Please advice about the below method:

update pg_database set datcollate='C.UTF-8', datctype='C.UTF-8'  where datname='wwkidbt';

Is there any impact on data/corruption if we do via update command ?

Thanks,

Daulat

 

 

 

 

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

Предыдущее
От: Josef Šimánek
Дата:
Сообщение: Re: REINDEX VERBOSE iso-8859-1 option
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: How to Change collate & ctype for an existing database?