![]() | |
#1
| |||
| |||
|
#2
| |||||
| |||||
|
|
today I ran into the "encoding problem". Migrating from Postgres 8 to Postgres 8.3 on a new Debian on another server, psql refused to import my LATIN1 databases, because the server has UTF8 set as locale. |
|
As I wanted to migrate to UTF8 with that specific database anyway, I edited my dump and went on with it, of course not after wasting a lot of time on research (because it was not mentioned, or at least not highlighted in the migration guide). So before I put the PostgreSQL people on the "black list", I'd like to try to understand first. |
|
What is it good for, why is it necessary? I don't see a "hard" reason for it, as certainly it hasn't been necessary up to Postgres 8. |
|
After all, what should be the problem of a RDBMS to handle different encoding standards in different databases, and what should be the problem of "conflicting" with the server? If I couldn't use UTF-8 in my application, well, I would switch the client encoding to LATIN1, so he would need to do conversion anyway. I just don't get the f... necessity of why it should be so inflexible, especially as it has not been necessary before. Even so, I would at least wish they made it clearer in their migration guide, and provided more comfortable tools to migrate. |
|
Maybe someone can help me to understand why the behaviour has been changed. |
#3
| ||||
| ||||
|
|
Hadanite Marasek wrote: today I ran into the "encoding problem". Migrating from Postgres 8 to Postgres 8.3 on a new Debian on another server, psql refused to import my LATIN1 databases, because the server has UTF8 set as locale. What exactly do you mean by "Postgres 8"? |
|
If you did everything correctly, that would mean that you had some non-Latin1 characters in your Latin1 database. Older versions of PostgreSQL have been less strict about verifying that the data in the database are properly encoded. This is an ongoing effort. |
|
As I wanted to migrate to UTF8 with that specific database anyway, I edited my dump and went on with it, of course not after wasting a lot of time on research (because it was not mentioned, or at least not highlighted in the migration guide). So before I put the PostgreSQL people on the "black list", I'd like to try to understand first. Not that I am particularly afraid of your black list, but I aknowledge the willingness to try to understand. It is deplorable that your posting has such an annoyed subtext. |
|
What behaviour of PostgreSQL are you complaining about? That it makes sure that strings are stored in the database encoding? |
#4
| |||
| |||
|
|
What exactly do you mean by "Postgres 8"? PostgreSQL 8.0.0 |
|
If you did everything correctly, that would mean that you had some non-Latin1 characters in your Latin1 database. Older versions of PostgreSQL have been less strict about verifying that the data in the database are properly encoded. This is an ongoing effort. That was not the cause, I'm talking about this: http://www.ashtech.net/~syntax/blog/...ng-Issues.html |
|
Well, I found it deplorable to deal with that problem, and yes, it annoyed me a LOT. I went strictly after the manual presented in http://www.postgresql.org/docs/8.3/i...P-DUMP-RESTORE Do you see something like "use vim to change the create statements" in there? |
#5
| |||
| |||
|
|
Hadanite Marasek wrote: What exactly do you mean by "Postgres 8"? PostgreSQL 8.0.0 Ouch. |
|
Ah, you want to create databases with different encodings in one database cluster, right? In PostgreSQL 8.3, you can do that if you create your cluster with the C locale. |
|
I understand your gripe in this case. It is only mentioned in the release notes, but I guess it would have deserved a mention in chapter 15.4. Nobody is perfect. But your problem should be addressed with the above, right? Yours, Laurenz Albe |
#6
| |||
| |||
|
|
PostgreSQL 8.0.0 Ouch. Whats Ouch? |
|
Ah, you want to create databases with different encodings in one database cluster, right? In PostgreSQL 8.3, you can do that if you create your cluster with the C locale. Yes, but maybe to give you more details: I run PostgreSQL on a server with other services, as it serves as a storage for two internal webapplications with little concurrent access. So I didn't see that as an option. |
|
Well, I solved it the other way, but maybe it helps someone else. In the end, I don't want to miss UTF-8 anymore. |
#7
| |||
| |||
|
|
Laurenz Albe schrieb: Hadanite Marasek wrote: What exactly do you mean by "Postgres 8"? PostgreSQL 8.0.0 Ouch. Whats Ouch? Ah, you want to create databases with different encodings in one database cluster, right? In PostgreSQL 8.3, you can do that if you create your cluster with the C locale. Yes, but maybe to give you more details: I run PostgreSQL on a server with other services, as it serves as a storage for two internal webapplications with little concurrent access. So I didn't see that as an option. In the end, I changed the dump as well as the one application that still ran on Latin1 (wanted to do that anyway). I understand your gripe in this case. It is only mentioned in the release notes, but I guess it would have deserved a mention in chapter 15.4. Nobody is perfect. But your problem should be addressed with the above, right? Yours, Laurenz Albe Well, I solved it the other way, but maybe it helps someone else. In the end, I don't want to miss UTF-8 anymore. |
![]() |
| Thread Tools | |
| Display Modes | |
| |