Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > upgrading to 8....
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 15125 of 17637
Post > Topic >>

upgrading to 8.3, utf-8 and latin2 locale problem

by mage@[EMAIL PROTECTED] (Mage) Apr 1, 2008 at 07:22 PM

Hello,

I am sure this won't be the first e-mail about this issue, however we 
are upgrading production-like environment. Please help.

For reproducing I've used two debian servers, same locales (en_US.UTF-8, 
en_US ISO-8859-1, hu_HU.UTF-8, hu_HU ISO-8859-2), Debian testing.

------------------------------------------------
Postgresql 8.2 (8.2.6-2):

/usr/lib/postgresql/8.2/bin/initdb -D /home/readonly/pg_data/ 
--locale='en_US.UTF-8' --lc-collate='hu_HU.UTF-8' 
--lc-ctype='hu_HU.UTF-8' --lc-time='hu_HU.UTF-8'
The files belonging to this database system will be owned by user "mage".
This user must also own the server process.

The database cluster will be initialized with locales
  COLLATE:  hu_HU.UTF-8
  CTYPE:    hu_HU.UTF-8
  MESSAGES: en_US.UTF-8
  MONETARY: en_US.UTF-8
  NUMERIC:  en_US.UTF-8
  TIME:     hu_HU.UTF-8
The default database encoding has accordingly been set to UTF8.


/usr/lib/postgresql/8.2/bin/pg_ctl -D /home/readonly/pg_data -l logfile 
-o '-p 5555' start
/usr/lib/postgresql/8.2/bin/psql -p 5555 template1


# create database test encoding = 'latin2';
CREATE DATABASE

------------------------------------------------
Postgresql 8.3 (8.3.0-1):

/usr/lib/postgresql/8.3/bin/initdb -D /home/readonly/pg_data/ 
--locale='en_US.UTF-8' --lc-collate='hu_HU.UTF-8' 
--lc-ctype='hu_HU.UTF-8' --lc-time='hu_HU.UTF-8'
The files belonging to this database system will be owned by user "mage".
This user must also own the server process.

The database cluster will be initialized with locales
  COLLATE:  hu_HU.UTF-8
  CTYPE:    hu_HU.UTF-8
  MESSAGES: en_US.UTF-8
  MONETARY: en_US.UTF-8
  NUMERIC:  en_US.UTF-8
  TIME:     hu_HU.UTF-8
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "hungarian".

/usr/lib/postgresql/8.3/bin/pg_ctl -D /home/readonly/pg_data -l logfile 
-o '-p 5555' start
/usr/lib/postgresql/8.3/bin/psql -p 5555 template1

template1=# create database test encoding = 'latin2';
ERROR:  encoding LATIN2 does not match server's locale hu_HU.UTF-8
DETAIL:  The server's LC_CTYPE setting requires encoding UTF8.

In Google we've found similar err messages for pg_upgradecluster.

----------------

Both server:
show all;
client_encoding                 | UTF8
 lc_collate                      | hu_HU.UTF-8    
 lc_ctype                        | hu_HU.UTF-8    
 lc_messages                     | en_US.UTF-8  
 lc_monetary                     | en_US.UTF-8  
 lc_numeric                      | en_US.UTF-8   
 lc_time                         | hu_HU.UTF-8      
server_encoding                 | UTF8

We would like to upgrade from 8.1 to 8.3. We have UTF-8 and LATIN2 
databases. Any idea?


       Mage



-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 4 Posts in Topic:
upgrading to 8.3, utf-8 and latin2 locale problem
mage@[EMAIL PROTECTED] (  2008-04-01 19:22:16 
Re: upgrading to 8.3, utf-8 and latin2 locale problem
tgl@[EMAIL PROTECTED] (T  2008-04-01 14:15:51 
Re: upgrading to 8.3, utf-8 and latin2 locale problem
mage@[EMAIL PROTECTED] (  2008-04-01 20:51:03 
Re: upgrading to 8.3, utf-8 and latin2 locale problem
tgl@[EMAIL PROTECTED] (T  2008-04-01 15:31:28 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 6:44:16 CST 2008.