pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
UTF8 Questions 2+ messages / 2 participants [nested] [flat]
* UTF8 Questions @ 2006-08-14 22:42 Abu Mushayeed <abumushayeed@yahoo.com> 0 siblings, 1 reply; 2+ messages in thread From: Abu Mushayeed @ 2006-08-14 22:42 UTC (permalink / raw) To: pgsql-admin We upgraded our Db from LATIN1 to UTF8 as follows: 1. new install with encoding=UTF8 2. pg_dump from old DB and import into new db using psql as follows: pg_dump out of old_db|psql into new_db 3. New feeds (data files) come in same as when the DB was latin1. If error message from any load script like "Invalid UTF8 code ...", then, "set client_encoding=latin1" in the script and run again and all is well. 4. all the other scripts run on the UTF8 Db as is and no errors, meaning the scripts has not been changed and is running as is before when DB was latin1. 5. Now, some of the DB feeds (data files) is changing to UTF8. What needs to be done when the data feeds changes to UTF8. Any other thoughts or if there is a problem that anyone sees, please help me with a solution. Thanks --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: UTF8 Questions @ 2006-08-15 02:16 Ivo Rossacher <rossacher@bluewin.ch> parent: Abu Mushayeed <abumushayeed@yahoo.com> 0 siblings, 0 replies; 2+ messages in thread From: Ivo Rossacher @ 2006-08-15 02:16 UTC (permalink / raw) To: pgsql-admin Am Dienstag, 15. August 2006 00.42 schrieb Abu Mushayeed: > We upgraded our Db from LATIN1 to UTF8 as follows: > > 1. new install with encoding=UTF8 > 2. pg_dump from old DB and import into new db using psql as follows: > pg_dump out of old_db|psql into new_db > 3. New feeds (data files) come in same as when the DB was latin1. If error > message from any load script like "Invalid UTF8 code ...", then, "set > client_encoding=latin1" in the script and run again and all is well. So most probably the dump is latin1 (this was the clientencoding during dumping). > 4. all > the other scripts run on the UTF8 Db as is and no errors, meaning the > scripts has not been changed and is running as is before when DB was > latin1. That there is no error message does not mean that there is no error in the encoding. It only means that there is no Invalid UTF8. So it is importent to set the correct client encoding, which was used for the backup, also during restore. > 5. Now, some of the DB feeds (data files) is changing to UTF8. What > needs to be done when the data feeds changes to UTF8. When you plan to insert non Latin1 codes into the database you have to change the clientencoding for backup/restore to UTF8. Have a look at chapter 20 of the manual for different possibilies to set the client encoding. Best regards Ivo > > Any other thoughts or if there is a problem that anyone sees, please help > me with a solution. > > Thanks > > > --------------------------------- > Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates > starting at 1¢/min. ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-08-15 02:16 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2006-08-14 22:42 UTF8 Questions Abu Mushayeed <abumushayeed@yahoo.com> 2006-08-15 02:16 ` Ivo Rossacher <rossacher@bluewin.ch>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox