Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 15B891337B4A for ; Tue, 15 Feb 2011 18:00:27 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 67743-07 for ; Tue, 15 Feb 2011 22:00:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by mail.postgresql.org (Postfix) with SMTP id 400F4133616B for ; Tue, 15 Feb 2011 18:00:18 -0400 (AST) Received: (qmail invoked by alias); 15 Feb 2011 22:00:17 -0000 Received: from 77-21-32-187-dynip.superkabel.de (EHLO [192.168.178.22]) [77.21.32.187] by mail.gmx.net (mp049) with SMTP; 15 Feb 2011 23:00:17 +0100 X-Authenticated: #955937 X-Provags-ID: V01U2FsdGVkX185HFoYxBY5eLvLjKuZGOunMUvG1dBpmUlRGkXzwS QAnOzLz9YnTIqi Message-ID: <4D5AF76A.10800@gmx.de> Date: Tue, 15 Feb 2011 23:00:10 +0100 From: Jan-Peter Seifert User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 CC: pgsql-admin@postgresql.org Subject: Re: cp1250 problem References: <201102151326.58744.achill@matrix.gatewaynet.com> In-Reply-To: <201102151326.58744.achill@matrix.gatewaynet.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.868 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, MISSING_HEADERS=1.021, RCVD_IN_DNSWL_NONE=-0.0001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201102/130 X-Sequence-Number: 36769 Hello, Am 15.02.2011 12:26, schrieb Achilleas Mantzios: > Στις Tuesday 15 February 2011 12:44:31 ο/η Lukasz Brodziak έγραψε: >> Hello, >> >> How can I set PostgreSQL locale and encoding to be pl_PL.cp1250 all I >> can do is pl_PL.UTF-8. >> I have PG 8.2.4 on Ubuntu 10.04 (polish version). There are no code pages in Ubuntu. The nearest what you can get seems to be encoding LATIN2 ( and a compatible locale ). These charsets are NOT identical though. > The locale for your whole cluster is defined in postgresql.conf. Not really - LC_COLLATE and LC_CTYPE are set during initialization of the cluster by initdb. You can verify the settings with pg_controldata: http://www.postgresql.org/docs/8.2/interactive/app-pgcontroldata.html As of PostgreSQL v8.4 you can specify these two locale settings different from the server's settings (for each database). If you plan to upgrade your PostgreSQL major server version beware of the removal of some implicit data type casts among other changes as of 8.3. Peter