There is no need to recreate the entire database cluster. However, you need to restore your database.
Run createb with these options ( man createdb ):
-E encoding, --encoding=encoding Specifies the character encoding scheme to be used in this database. The character sets supported by the PostgreSQL server are described in Section 22.3.1, "Supported Character Sets", in the documentation. -l locale, --locale=locale Specifies the locale to be used in this database. This is equivalent to specifying both --lc-collate and --lc-ctype. --lc-collate=locale Specifies the LC_COLLATE setting to be used in this database. --lc-ctype=locale Specifies the LC_CTYPE setting to be used in this database.
It seems you really cannot change the collation of an existing database:
=> ALTER DATABASE dbname SET "Collate" To Russian; ERROR: unrecognized configuration parameter "Collate"
Note that you can set sort options for a table or column; see a good tutorial on sorting options in PostgreSQL.
source share