Re: regenereate data/ locales

Lists: pgsql-admin
From: Maxi Combina <maxicombina(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: regenereate data/ locales
Date: 2005-08-22 14:10:54
Message-ID: 285af08705082207101029a56e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Hello,
I am using postgresql 7.4.5, and was having some trouble with the
initcap() function. The problem was the following:
initcap('aéeou') = AéEou,

and I need
initcap('aéeou') = Aéeou,

I found in the documentation that to correct this behaviour, I must
run initdb --locale=SOMETHING.

Well, I did it (with --locale=es_AR), and now it works!

However, I could not did it in an easy way, because initdb complained
saying that the data/ directory was not empty. So, I had to dump all
my databases, remove the files from data/, run `initdb --locale=es_AR'
and restore the databases.

Is there any shorter way to change the locales? I didnot found any
`recreate' or `regenerate' command.

Regards,
Maxi


From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Maxi Combina <maxicombina(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: regenereate data/ locales
Date: 2005-08-22 15:09:28
Message-ID: 20050822150928.GC30337@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

On Mon, Aug 22, 2005 at 11:10:54AM -0300, Maxi Combina wrote:

[must run initdb to switch locale]
>
> Is there any shorter way to change the locales? I didnot found any
> `recreate' or `regenerate' command.

No, initdb is the only option.

--
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"El número de instalaciones de UNIX se ha elevado a 10,
y se espera que este número aumente" (UPM, 1972)