PostgreSQL collation error

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Mar 20, 2012
Company: Abaco Soluciones S.A.

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

 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

We are investigating your problem.

 
#3
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

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.

 
#4
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Mar 20, 2012
Company: Abaco Soluciones S.A.

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

Edited: Mikhail Ivanenko - Sep 06, 2012 07:57 PM
 
#5
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

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.

 
#6
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Mar 20, 2012
Company: Abaco Soluciones S.A.

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?

 
#7
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

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

 
#8
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

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.

 
#9
People who like this:1Yes/0No
Active user
Rating: 6
Joined: Mar 20, 2012
Company: Abaco Soluciones S.A.

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.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.