Re: pg_dump on local Windows, pg_restore on Linux? - Mailing list pgsql-general

From Leif B. Kristensen
Subject Re: pg_dump on local Windows, pg_restore on Linux?
Date
Msg-id 200708152031.45917.leif@solumslekt.org
Whole thread Raw
In response to Re: pg_dump on local Windows, pg_restore on Linux?  ("Phoenix Kiula" <phoenix.kiula@gmail.com>)
List pgsql-general
On Wednesday 15. August 2007, Phoenix Kiula wrote:
>> At least on a *nix system, collation is based on the value of the
>> LC_ALL environment variable at dbinit time. There's nothing you can
>> do about it in a live database. IMO that's a little awkward, and is
>> what finally made me change the global from ISO-8859-1 to UTF-8 on
>> my three Gentoo Linux machines.
>
>This is great info, thanks. Could you let me know how I could change
>the global values of "LC_ALL"?  I am on Linux too, just CentOS, but I
>suppose it should be the same or similar?

I don't have the foggiest idea how it's done in CentOS. In Gentoo, you
just edit the contents of /etc/env.d/02locale:

balapapa ~ # cat /etc/env.d/02locale
LC_ALL="nb_NO.UTF-8"
LANG=""
LC_CTYPE="nb_NO.UTF.8"
LC_NUMERIC="nb_NO.UTF.8"
LC_TIME="nb_NO.UTF.8"
LC_COLLATE="nb_NO.UTF.8"
LC_MONETARY="nb_NO.UTF.8"
LC_PAPER="nb_NO.UTF.8"
LC_NAME="nb_NO.UTF.8"
LC_ADDRESS="nb_NO.UTF.8"
LC_TELEPHONE="nb_NO.UTF.8"
LC_MEASUREMENT="nb_NO.UTF.8"
LC_IDENTIFICATION="nb_NO.UTF.8"

To update the environment settings globally, the Gentoo method is to
issue the command

"env-update && source /etc/profile"

from root. But you should really Read The Fine Manual about this. If you
for instance have filenames with non-ASCII characters in them, prepare
yourself for some interesting challenges.
--
Leif Biberg Kristensen | Registered Linux User #338009
http://solumslekt.org/ | Cruising with Gentoo/KDE
My Jazz Jukebox: http://www.last.fm/user/leifbk/

pgsql-general by date:

Previous
From: Decibel!
Date:
Subject: Re: Trigger Procedure Error: NEW used in query that is not in a rule
Next
From: "D. Dante Lorenso"
Date:
Subject: SELECT ... FOR UPDATE performance costs? alternatives?