Adding new collations after pg_upgrade?

Started by rihadover 7 years ago5 messagesgeneral
Jump to latest
#1rihad
rihad@mail.ru

Hi. on a freshly installed 10.6 I can see all ICU collations added in
pg_collation schema. Is there a way to have them for an existing
database cluster?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: rihad (#1)
Re: Adding new collations after pg_upgrade?

rihad <rihad@mail.ru> writes:

Hi. on a freshly installed 10.6 I can see all ICU collations added in
pg_collation schema. Is there a way to have them for an existing
database cluster?

There's a function called something like pg_import_system_collations.
See documentation.

regards, tom lane

#3rihad
rihad@mail.ru
In reply to: Tom Lane (#2)
Re: Adding new collations after pg_upgrade?

On 01/06/2019 07:51 PM, Tom Lane wrote:

rihad <rihad@mail.ru> writes:

Hi. on a freshly installed 10.6 I can see all ICU collations added in
pg_collation schema. Is there a way to have them for an existing
database cluster?

There's a function called something like pg_import_system_collations.
See documentation.

Thanks a lot!

postgres=# select pg_import_system_collations('pg_catalog');
 pg_import_system_collations
-----------------------------
                         798
(1 row)

postgres=# select pg_import_system_collations('pg_catalog');
 pg_import_system_collations
-----------------------------
                           0
(1 row)

Show quoted text

regards, tom lane
.

#4rihad
rihad@mail.ru
In reply to: rihad (#3)
Re: Adding new collations after pg_upgrade?

On 01/06/2019 07:57 PM, rihad wrote:

On 01/06/2019 07:51 PM, Tom Lane wrote:

rihad <rihad@mail.ru> writes:

Hi. on a freshly installed 10.6 I can see all ICU collations added in
pg_collation schema. Is there a way to have them for an existing
database cluster?

There's a function called something like pg_import_system_collations.
See documentation.

Thanks a lot!

postgres=# select pg_import_system_collations('pg_catalog');
 pg_import_system_collations
-----------------------------
                         798
(1 row)

postgres=# select pg_import_system_collations('pg_catalog');
 pg_import_system_collations
-----------------------------
                           0
(1 row)

Oops, I meant schema pg_collation )

Show quoted text

            regards, tom lane
.

#5rihad
rihad@mail.ru
In reply to: rihad (#4)
Re: Adding new collations after pg_upgrade?

On 01/06/2019 08:05 PM, rihad wrote:

On 01/06/2019 07:57 PM, rihad wrote:

On 01/06/2019 07:51 PM, Tom Lane wrote:

rihad <rihad@mail.ru> writes:

Hi. on a freshly installed 10.6 I can see all ICU collations added in
pg_collation schema. Is there a way to have them for an existing
database cluster?

There's a function called something like pg_import_system_collations.
See documentation.

Thanks a lot!

postgres=# select pg_import_system_collations('pg_catalog');
 pg_import_system_collations
-----------------------------
                         798
(1 row)

postgres=# select pg_import_system_collations('pg_catalog');
 pg_import_system_collations
-----------------------------
                           0
(1 row)

Oops, I meant schema pg_collation )

Phew, sorry for my confusion. Schema pg_catalog. Table pg_collation. So
I did it right )

Show quoted text

            regards, tom lane
.