Strange collation names ("hu_HU.UTF-8")

Поиск
Список
Период
Сортировка
От Durumdara
Тема Strange collation names ("hu_HU.UTF-8")
Дата
Msg-id CAEcMXhmBGwM5SL7R7XSxqb7k_O0Sn4EoOdkeyj=jthvr0+u1_Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: Strange collation names ("hu_HU.UTF-8")  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Dear Members!

Today we found strange database collation names in a server (V11).

select -- datname,
       distinct datcollate
from pg_database
order by datcollate --, datname;

"hu_HU.UTF-8"
"hu_HU.UTF8"
"hu_HU.utf8"

The PGAdmin also gives us these possible collations in the dialog.
Some of the databases were migrated from 9.6 by Python script, and we used
   "hu_HU.UTF-8" 
to create the empty databases before restoring them.

What I don't understand, that if I query for collations, I got only this:

SELECT *
FROM pg_collation
where upper(collname) like '%HU%' -- and upper(collname) like '%UTF%'
order by collname

hu_HU.utf8

This collation ("hu_HU.UTF-8") doesn't cause any problems, and PGSQL V11 accepts it.

The whole problem appeared when we wanted to copy a database to a new (with defining the old as template).

Error: new collation (hu_HU.utf8) is incompatible with the collation of the template database (hu_HU.UTF-8)

So maybe the UTF-8 isn't valid but the PG accepted that???
Or is it valid and inherited from 9.6?

Please help me a little bit! Thank you!

Best regards
dd

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

Предыдущее
От: Gavan Schneider
Дата:
Сообщение: Re: Creation of FK without enforcing constraint for existing data
Следующее
От: Ron
Дата:
Сообщение: Re: Syntax error when combining --set and --command has me stumped