Re: [BUGS] Recommended approach for upgrading DBs with nonmatching encodings

2008-03-30 Thread Tom Lane
Martin Pitt <[EMAIL PROTECTED]> writes: > BTW, many people seem to run the server under C and use different > encodings in their DBs (latin, UTF8). Shouldn't that cause similar > problems with collation, data type checking (ischar(), etc.)? What do > you recommend should the upgrade script do if it

Re: [BUGS] Recommended approach for upgrading DBs with nonmatching encodings

2008-03-30 Thread Martin Pitt
Hi Tom, Tom Lane [2008-03-30 17:15 -0400]: > > pg_dump -Fc -E UTF8 -p 5432 latin1test | pg_restore -p 5433 -d template1 > > -C > > Yeah. This will try to create the new latin1test with all the same > properties it had before, including encoding I see, so it's intended to behave like this. m

Re: [BUGS] Recommended approach for upgrading DBs with nonmatching encodings

2008-03-30 Thread Tom Lane
Martin Pitt <[EMAIL PROTECTED]> writes: > Tom Lane [2008-03-30 16:43 -0400]: >> Huh? Please provide a test case. > Ah, I got it. This fails: > pg_dump -Fc -E UTF8 -p 5432 latin1test | pg_restore -p 5433 -d template1 -C > (5432 is 8.1, 5433 is 8.3, both with locale ru_RU.UTF-8; > createdb -E

Re: [BUGS] Recommended approach for upgrading DBs with nonmatching encodings

2008-03-30 Thread Martin Pitt
Tom Lane [2008-03-30 16:43 -0400]: > Martin Pitt <[EMAIL PROTECTED]> writes: > > One problem with this is that while pg_dump -E UTF8 works (with SQL > > output), -E does not seem to have any effect when using -Fc. > > Huh? Please provide a test case. Ah, I got it. This fails: pg_dump -Fc -E U

Re: [BUGS] Recommended approach for upgrading DBs with nonmatching encodings

2008-03-30 Thread Tom Lane
Martin Pitt <[EMAIL PROTECTED]> writes: > One problem with this is that while pg_dump -E UTF8 works (with SQL > output), -E does not seem to have any effect when using -Fc. Huh? Please provide a test case. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bug

Re: [BUGS] Recommended approach for upgrading DBs with nonmatching encodings

2008-03-30 Thread Martin Pitt
Hi again, Martin Pitt [2008-03-30 20:40 +0200]: > My current pg_upgradecluster uses pg_dumpall to copy the schema, and a > per-db pg_dump to copy the DB table contents. Will calling pg_dump > with --encoding= always DTRT and is > it meant to solve this problem? One problem with this is that whil