default db

Started by Sandro Dentellaalmost 19 years ago3 messagesgeneral
Jump to latest
#1Sandro Dentella
sandro@e-den.it

Hi,

I see that the default encoding for a db is taken from template1.

I'm using debian and I don't understand how to create template1 on
installation of postgresql with a preferred encoding.

Is it safe to just dump/restore template1 with different encoding?

TIA
*:-)

#2John D. Burger
john@mitre.org
In reply to: Sandro Dentella (#1)
Re: default db

Sandro Dentella wrote:

I'm using debian and I don't understand how to create template1 on
installation of postgresql with a preferred encoding.

Is it safe to just dump/restore template1 with different encoding?

Or drop template1, and then recreate it from template0 with the
defaults you want. I gather that's the point of template0. See the
Fine Manual:

http://www.postgresql.org/docs/8.1/interactive/manage-ag-
templatedbs.html

- John D. Burger
MITRE

#3Hannes Dorbath
light@theendofthetunnel.de
In reply to: Sandro Dentella (#1)
Re: default db

On 22.05.2007 14:02, Sandro Dentella wrote:

I see that the default encoding for a db is taken from template1.

I'm using debian and I don't understand how to create template1 on
installation of postgresql with a preferred encoding.

Is it safe to just dump/restore template1 with different encoding?

Default encoding is taken from the cluster locale. Debian sure has some
fancy wrapper scripts for that, but

initdb -D $PGDATA --locale='en_US.utf8'

is the command to create a new cluster with another locale. Chose one
from locale -a

--
Regards,
Hannes Dorbath