paul kersey-smith's picture

Hi there,

I've just discovered Turnkey Linux and i've downloaded and install the postgresql appliance and all is well except one thing.

I've restored a database and although everything came over in one piece all the money fields are showing $ instead of £ signs (which is what I need).

Although the system locale is set to en_GB I can't set the postgres locale accordingly.

Is there any way around this that anyone knows of (short of using initdb to create a new cluster, which by the way I can't find the initdb program).

 

cheers in advance

 

paul

Forum: 
Liraz Siri's picture

From http://www.postgresql.org/docs/7.4/static/charset.html:

"The nature of some locale categories is that their value has to be fixed for the lifetime of a database cluster. That is, once initdb has run, you cannot change them anymore. LC_COLLATE and LC_CTYPE are those categories. They affect the sort order of indexes, so they must be kept fixed, or indexes on text columns will become corrupt. PostgreSQL enforces this by recording the values of LC_COLLATE and LC_CTYPE that are seen by initdb. The server automatically adopts those two values when it is started."

Maybe try dumping, fiddling with the output and restoring to a new database?

Add new comment