CREATE COLLATION to match pg_collation data

Started by rihadabout 7 years ago3 messagesgeneral
Jump to latest
#1rihad
rihad@mail.ru

Hi, since pg_import_system_collations() that would solve all this
doesn't exist in 9.6.x, is there a way to I properly map it to a CREATE
COLLATE call? Specifically I need to have this collation (from 10.x) in
9.6.x so it works on FreeBSD:

        collname        | collnamespace | collowner | collprovider |
collencoding |    collcollate    | collctype     | collversion
------------------------+---------------+-----------+--------------+--------------+-------------------+-------------------+-------------

 az-x-icu               |            11 |        10 | i           
|           -1 | az                | az                | 153.88.34

CREATE COLLATIONname (
[ LOCALE =locale, ]
[ LC_COLLATE =lc_collate, ]
[ LC_CTYPE =lc_ctype ]
)
CREATE COLLATIONname FROMexisting_collation
https://www.postgresql.org/docs/9.6/sql-createcollation.html Can I just
not use "create collation", and simply insert the new row as is? Thanks
for any tips.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: rihad (#1)
Re: CREATE COLLATION to match pg_collation data

rihad <rihad@mail.ru> writes:

Hi, since pg_import_system_collations() that would solve all this
doesn't exist in 9.6.x, is there a way to I properly map it to a CREATE
COLLATE call? Specifically I need to have this collation (from 10.x) in
9.6.x so it works on FreeBSD:

        collname        | collnamespace | collowner | collprovider |
collencoding |    collcollate    | collctype     | collversion
------------------------+---------------+-----------+--------------+--------------+-------------------+-------------------+-------------
 az-x-icu               |            11 |        10 | i           
|           -1 | az                | az                | 153.88.34

That's an ICU collation, so you're out of luck: there is no ICU
support in 9.6.

regards, tom lane

In reply to: Tom Lane (#2)
Re: CREATE COLLATION to match pg_collation data

On Sat, Jan 12, 2019 at 7:13 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

That's an ICU collation, so you're out of luck: there is no ICU
support in 9.6.

FWIW, there is some form of FreeBSD Postgres support for ICU that
predates the officially supported ICU feature. The FreeBSD Postgres
packages have been built with ICU support for many years -- they
modify the source code minimally to make this work. It may well still
be impossible to use "az-x-icu" on a FreeBSD installation of 9.6,
though.

--
Peter Geoghegan