I'm using PostgreSQL 7.4.x installed on Debian Sarge or testing distribution.
I'm realized that I does not set apropriate locale - for me, for now it is hu_HU ISO8859-2.
First of all I generated locale hu_HU and set as default (dpkg-reconfigure locales)
Try reconfigure postgresql - dpkg-reconfigure postgresql - but it is not solve the problem.
After long struggling on the WEB and exploring my home server I found initdb (it is quite hidden - /usr/lib/postgresql/bin/).
Stop postmaster - #/etc/init.d/postgresql stop.Clean my old and wrong data "cluster" - /var/lib/postgres/data
As user "postgres" rebuild the cluster, with apropriate locale and password for user "postgres".
Restore links to settings in /etc/postgresql - pg_hba.conf, pg_ident.conf, postgresql.conf.
Start postmaster - #/etc/init.d/postgresql start
locale and collate is became well.
This is the right way? - nothing more simple (for my fortune no real database was there, I did not need to rebuild;o).