Re: [ADMIN] [GENERAL] Encoding problem using pg_dumpall

2009-01-31 Thread Milen A. Radev
Cliff Pratt написа: [...] > You should be able to knock up a simple script in bash, perl or python > to do what you want. > > Sort of like: > > Use 'psql' to get a list of the databases > Sanitize the list. > Loop through the list doing backup. > At the end zip them all. > > With a little bit of tr

Re: [ADMIN] [GENERAL] Encoding problem using pg_dumpall

2009-01-31 Thread Cliff Pratt
On Sat, Jan 31, 2009 at 12:23 AM, Michael Monnerie wrote: > On Freitag 30 Januar 2009 Tom Lane wrote: >> The -Fc (and -Ft) formats are only designed to hold the contents of a >> single database; and pg_restore only knows how to restore into a >> single database. >> >> If you feel like fixing that,

Re: [ADMIN] [GENERAL] Encoding problem using pg_dumpall

2009-01-30 Thread Michael Monnerie
On Freitag 30 Januar 2009 Tom Lane wrote: > The -Fc (and -Ft) formats are only designed to hold the contents of a > single database; and pg_restore only knows how to restore into a > single database. > > If you feel like fixing that, step right up. Sorry, didn't want to step on toes here. I know t

Re: [ADMIN] [GENERAL] Encoding problem using pg_dumpall

2009-01-29 Thread Tom Lane
Michael Monnerie writes: > Why couldn't pg_dumpall get the same behaviour as pg_dump? It could get > that -Fc, and couldn't it be implementet as "call pg_dump for each db > and once for the system"? Why is it that different at all? The -Fc (and -Ft) formats are only designed to hold the content

Re: [ADMIN] [GENERAL] Encoding problem using pg_dumpall

2009-01-29 Thread Michael Monnerie
On Donnerstag 29 Januar 2009 Magnus Hagander wrote: > Most people use pg_dump. I know I recommend everbody to use pg_dump > to dump the database, because you can use -Fc. Then just use > pg_dumpall to dump the globals, and they normally don't have any > non-ascii in them. Why couldn't pg_dumpall g

Re: [ADMIN] [GENERAL] Encoding problem using pg_dumpall

2009-01-29 Thread Magnus Hagander
Tom Lane wrote: > Magnus Hagander writes: >> Tom Lane wrote: >>> (Hmm, actually it looks like pg_dumpall hasn't got a -E switch, >>> which seems like an oversight. So you need to fix your locale, >>> or else use pg_dump directly.) > >> IIRC, you can't set the windows console to be UTF8. > > Ugh

Re: [ADMIN] [GENERAL] Encoding problem using pg_dumpall

2009-01-29 Thread Tom Lane
Magnus Hagander writes: > Tom Lane wrote: >> (Hmm, actually it looks like pg_dumpall hasn't got a -E switch, >> which seems like an oversight. So you need to fix your locale, >> or else use pg_dump directly.) > IIRC, you can't set the windows console to be UTF8. Ugh. That seems to raise the pr

Re: [ADMIN] [GENERAL] Encoding problem using pg_dumpall

2009-01-29 Thread Magnus Hagander
Tom Lane wrote: > "Moshe Ben-Shoham" writes: >> C:\Program Files\PostgreSQL\8.3\bin>pg_dumpall -U admint > >> c:\temp\dbdump.sql >> pg_dump: SQL command failed >> pg_dump: Error message from server: ERROR: character 0xd595 of encoding >> "UTF8" has no equivalent in "WIN1252" > > Apparently you h

Re: [ADMIN] [GENERAL] Encoding problem using pg_dumpall

2009-01-29 Thread Tom Lane
"Moshe Ben-Shoham" writes: > C:\Program Files\PostgreSQL\8.3\bin>pg_dumpall -U admint > > c:\temp\dbdump.sql > pg_dump: SQL command failed > pg_dump: Error message from server: ERROR: character 0xd595 of encoding > "UTF8" has no equivalent in "WIN1252" Apparently you have WIN1252 set as the defa