Problem s ceskym tridenim v PostgreSQL 7.1

Tomas Valousek xvalous na pluto.pslib.cz
Čtvrtek Srpen 8 14:18:28 CEST 2002


Dobry den,
nemohu donutit postgres, aby spravne cesky tridil...
Mam Redhat 7.1CZ, upgradoval jsem na PSQL z 7.0 na 7.1 stazene z 
ftp.linux.cz/pub/postgresql/binary/v7.1/RPMS/RedHat-7.1/

[root na ns /tmp]# rpm -qa |grep postgres
postgresql-perl-7.1.3-2
postgresql-libs-7.1-1
postgresql-server-7.1-1
postgresql-docs-7.1-1
postgresql-7.1-1
postgresql-devel-7.1-1
postgresql-contrib-7.1-1

[root na ns /tmp]# pg_config --configure
--enable-locale --with-CXX --prefix=/usr --with-perl --enable-multibyte 
--with-tcl --with-odbc --enable-syslog --with-python 
--sysconfdir=/etc/pgsql --mandir=/usr/share/man --docdir=/usr/share/doc 
--includedir=/usr/include/pgsql --datadir=/usr/share/pgsql

[root na ns /tmp]# set |grep LANG
LANG=cs_CZ

[postgres na ns /tmp]# set |grep LANG
LANG=cs_CZ

[root na ns /tmp]# psql -U valy testtt
testtt=# SHOW server_encoding;
NOTICE:  Current server encoding is LATIN2
testtt=# SHOW client_encoding;
NOTICE:  Current client encoding is LATIN2

testtt=# SELECT b FROM a ORDER BY b;
      b
--------------
 Jak
 ahoj
 se máš?
 Že dobře ;-)
 čudlo

Pokud to vyzkousim setridit v souboru na konzoli, tak to dopadne OK:
[root na ns /tmp]# sort TEST
ahoj
čudlo
Jak
se máš?
Že dobře ;-)

Pak jsem jeste vyzkousel upravit /etc/init.d/potgresql:

Puvodne:
su -l postgres -c "LC_ALL=C /usr/bin/pg_ctl  -D $PGDATA -p 
/usr/bin/postmaster start >/dev/null 2>&1" < /dev/null

Po me zmene:
su -l postgres -c "export LC_ALL=cs_CZ; export LC_COLLATE=cs_CZ; export 
LANG=cs_CZ; /usr/bin/pg_ctl  -D $PGDATA -p /usr/bin/postmaster start 
>/dev/null 2>&1" < /dev/null

Ale je to stale stejne :-(



-- 
	Tomas -VALY- Valousek
	web design, internet projects, linux etc..
email: tomas na valousek.cz
www:   http://www.pslib.cz/~xvalous 	(~=ALT+126)

	



Další informace o konferenci Test