Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-23 Thread Peter Eisentraut
On fre, 2011-12-23 at 17:32 +0200, Andrus wrote: > >If you don't want to re-initdb, you could just update the datctype and > >datcollate columns of pg_database for template0. > > Thank you. > where to find sql update statement which does this ? > Is > > update pg_database set datctype ='et_EE.UTF

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-23 Thread Andrus
If you don't want to re-initdb, you could just update the datctype and datcollate columns of pg_database for template0. Thank you. where to find sql update statement which does this ? Is update pg_database set datctype ='et_EE.UTF-8', datcollate ='et_EE.UTF-8' best for this ? template0 is r

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-23 Thread Adrian Klaver
On Friday, December 23, 2011 7:26:08 am Andrus wrote: > >Would seem to be one of two things: > >1) The initdb is being done before the locale is changed. > >or > >2) The installation is overriding the locale, though I find this one less > >possible than 1. > > Thank you. > How to re-configure Post

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-23 Thread Andrus
Would seem to be one of two things: 1) The initdb is being done before the locale is changed. or 2) The installation is overriding the locale, though I find this one less possible than 1. Thank you. How to re-configure Postresql db cluster so that uses Debian default system locale? Andrus.

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-23 Thread Peter Eisentraut
On tor, 2011-12-22 at 18:29 +0200, Andrus wrote: > How to force command > > CREATE DATABASE TEMPLATE = template0 > > to use et_EE.UTF-8 locale by default ? If you don't want to re-initdb, you could just update the datctype and datcollate columns of pg_database for template0. If you want to re

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-23 Thread Adrian Klaver
On Thursday, December 22, 2011 1:22:39 pm Andrus wrote: > > Actually the interesting part would be what locale > > locale > LANG=et_EE.UTF-8 > LC_CTYPE="et_EE.UTF-8" > LC_NUMERIC="et_EE.UTF-8" > LC_TIME="et_EE.UTF-8" > LC_COLLATE="et_EE.UTF-8" > LC_MONETARY="et_EE.UTF-8" > LC_MESSAGES="et_EE.UTF-

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Andrus
Actually the interesting part would be what locale locale LANG=et_EE.UTF-8 LC_CTYPE="et_EE.UTF-8" LC_NUMERIC="et_EE.UTF-8" LC_TIME="et_EE.UTF-8" LC_COLLATE="et_EE.UTF-8" LC_MONETARY="et_EE.UTF-8" LC_MESSAGES="et_EE.UTF-8" LC_PAPER="et_EE.UTF-8" LC_NAME="et_EE.UTF-8" LC_ADDRESS="et_EE.UTF-8" LC_

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Adrian Klaver
On Thursday, December 22, 2011 9:45:16 am Andrus wrote: > > dpkg-reconfigure locales > Generating locales (this might take a while)... > en_US.UTF-8... done > et_EE.UTF-8... done > Generation complete. > *** update-locale: Warning: LANGUAGE ("en_US:en") is not compatible with > LANG (et_EE.UT

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Andrus
What application? My application. Well you would use template0 as the TEMPLATE only if you wanted to CREATE a database with different collation than that in template1(the default template for the CREATE DATABASE command). So the question then is, why is the database cluster being created wit

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Bèrto ëd Sèra
Hi! > using template1 requires exclusive access to cluster. > I cannot force all users to log out while creating new db. > So using template1 is not possible. > IMHO you really misunderstood the manual. The exclusive access is NOT to the entire cluster, but to the template. Which in turn means t

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Bèrto ëd Sèra
> > Is it reasonable to use commands > > export LC_COLLATE='et_EE.UTF-8' > export LC_CTYPE='et_EE.UTF-8' > > apt-get -t squeeze-backports install postgresql-9.1 postgresql-common > postgresql-contrib > Hmmm no, not really. If your problem is that the system locale is wrong for your needs, you're g

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Andrus
http://www.postgresql.org/docs/8.1/interactive/manage-ag-templatedbs.html (see last comment), I haven't checked it myself as I usually have a mix of locales in my installs (often even in a single db) and never really used any "default", but it should still work. using template1 requires exclus

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Andrus
Is it reasonable to use commands export LC_COLLATE='et_EE.UTF-8' export LC_CTYPE='et_EE.UTF-8' apt-get -t squeeze-backports install postgresql-9.1 postgresql-common postgresql-contrib Will this force et_EE.UTF-8 locale ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgr

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Adrian Klaver
On Thursday, December 22, 2011 8:29:11 am Andrus wrote: > Adrian and Bèrto, > > Thank you very much for quick and excellent replies. Locale names are > different in every Linux distro. > Postgresql does not provide any way to retrieve them (ssh access is reqired > to retireve them using locale -a)

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Bèrto ëd Sèra
> > Hi! > > How to force command > > CREATE DATABASE TEMPLATE = template0 > > to use et_EE.UTF-8 locale by default ? > http://www.postgresql.org/docs/8.1/interactive/manage-ag-templatedbs.html (see last comment), I haven't checked it myself as I usually have a mix of locales in my installs (of

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-22 Thread Andrus
Adrian and Bèrto, Thank you very much for quick and excellent replies. Locale names are different in every Linux distro. Postgresql does not provide any way to retrieve them (ssh access is reqired to retireve them using locale -a) Thus suggection using hard coded locale names is not possible.

Re: [GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-21 Thread Adrian Klaver
On Wednesday, December 21, 2011 10:28:24 am Andrus wrote: > In fresh Debian installation default system locale is set to et_EE.UTF-8 > using > > dpkg-reconfigure locales > > Postgres is installed using > > apt-get update > apt-get -t squeeze-backports install postgresql-9.1 postgresql-common > p

[GENERAL] How to create database with default system locale is set to et_EE.UTF-8

2011-12-21 Thread Andrus
In fresh Debian installation default system locale is set to et_EE.UTF-8 using dpkg-reconfigure locales Postgres is installed using apt-get update apt-get -t squeeze-backports install postgresql-9.1 postgresql-common postgresql-contrib Trying to create database with et_EE.UTF-8 collation and