PostgreSQL: LC_COLLATE

Hi

We would like to set LC_COLLATE to LATIN1 for our Postgres database. In a manual we read that setting this option for an existing database is not possible (since existing indexes will fail). Is this true?

If yes: We installed postgres with the dmg from www.kyngchaos.com. If we install a new database: Where can we define LC_COLLATE? Could we set it in the file postgresql.conf?

Thanks for help and regards

Hi Birgit,

birgit:
We would like to set LC_COLLATE to LATIN1 for our Postgres database. In a manual we read that setting this option for an existing database is not possible (since existing indexes will fail). Is this true?

I believe it is.

birgit:
If yes: We installed postgres with the dmg from www.kyngchaos.com. If we install a new database: Where can we define LC_COLLATE? Could we set it in the file postgresql.conf?

The default LC_COLLATE is actually determined when PostgreSQL is compiled or installed and is read-only.
To set it manually (per database) you need to use the shell tool ‘initdb’.
Read more at http://www.postgresql.org/docs/8.3/stat … nitdb.html

Hope this helps.

Hi Robert

Thank you for your answer.

Since we use the installer from kyng chaos, we never have to compile the db and install it with ‘initdb’. But somewhere inside the install scripts, initdb will be executed and maybe there is somewhere a config file for the argument LC_COLLATE?

If no Servoy user did need this configuration so far, I’ll probably have to ask kyng chaos himself.

Best regards

Hi Birgit,

It means that when you create a new database in PostgreSQL you need to use the initdb command with the --lc-collate parameter.
You will find it in /usr/local/bin/ along with the other PG tools.

Hope this helps.

Thanks and regards!