Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > PostgreSQL collation error

Forum

Search UsersRules
PostgreSQL collation error
#1
Active user
Points:: 0
Joined:: Mar 20, 2012

We had 1C base for development in file mode, but now we need to install 1C enterprise server.

We installed 1C server and PostgreSQL database server on CentOS. Everything works fine when we creating 1C database with english or russian language in regional settings field in 1C database properties.
But the problem appears when we are trying to cre ate database with spanish language.
When we chose Spanish(Ecuador) in regional settings in database creation dialog we have an error message:

Code
Error creating infobase:
Infobase error
Error setting or changing Infobase regional settings
Required collation is not supported by database.

But in postgresql locale es_EC.UTF8 is chosen.
When clicking OK and trying to create the same database without changing any parameters infobase being successfully created.
But when we try to load into this database data previously unloaded from file mode infobase we got an error:
Code
Error setting or changing Infobase regional settings
Required collation is not supported by database
because:
Required collation is not supported by database


1C Server - 1C:Enterprise 8.3 (8.3.1.531)
PostgreSQL - 9.1.2-1.1C

Profile
#2
Guest
Points::
Joined::

We are investigating your problem.

Profile
#3
Guest
Points::
Joined::

PostgreSQL does not support creating databases with collations which differ from the PostgreSQL's cluster collation. So the cluster's collation must be Spanish (Equador) too.

Profile
#4
Active user
Points:: 0
Joined:: Mar 20, 2012

I initialized PostgreSQL cluster as

Code
initdb -D /var/lib/pgsql/data --locale=es_EC.UTF-8


and now we have at server these databases:
Code
 X List of databases
   Name    |  Owner   | Encoding |  Collation  |    Ctype    |   Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
 1c_db_    | postgres | UTF8     | es_EC.UTF-8 | es_EC.UTF-8 |
 1c_db_ec  | postgres | UTF8     | es_EC.UTF-8 | es_EC.UTF-8 |
 1c_db_ec0 | postgres | UTF8     | es_EC.UTF-8 | es_EC.UTF-8 |
 postgres  | postgres | UTF8     | es_EC.UTF-8 | es_EC.UTF-8 |
 template0 | postgres | UTF8     | es_EC.UTF-8 | es_EC.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
 template1 | postgres | UTF8     | es_EC.UTF-8 | es_EC.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres


First 3 databases were created by 1C Enterprise server

Profile
#5
Guest
Points::
Joined::

The problem is that localeName es_EC corresponds to collate  eModern_Spanish while pglang es corresponds to collate eLatin1_General.
When those collations are compared the error is displayed.

Profile
#6
Active user
Points:: 0
Joined:: Mar 20, 2012

Thank you, but could you give me some advice how to fix it?
As I understand, 1C is trying to cre ate database in UTF8 encoding, but ModernSpanish and Latin1_General are kinds of windows-1252 encoding? And in postgresql show all I can see that lc_collate = es_EC.UTF-8. When I initialize cluster with locale=es_EC I have another error: Error creating infobase: encoding UTF8 doesn't match locale es_EC.

And more interesting question: why infobases are being created successfully only from the second try?

Profile
#7
Guest
Points::
Joined::

Sorry for the delay, our engineers are still investigating your problem.

Profile
#8
Guest
Points::
Joined::

Hello, Mikhail!

The temporary solution is to try to create the infobase with es_AR (spanish language + Argentina country) or es (spanish language, no country) encoding.

Profile
#9
Active user
Points:: 0
Joined:: Mar 20, 2012

Hello. I tried to compile postreSQL 9.1.2 from sources on CentOS 6.5 x64 and i managed to initialize postgreSQL cluster with es_EC.UTF8 collation.

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.