Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Uer5i-0003sR-6J for pgsql-pkg-debian@arkaria.postgresql.org; Tue, 21 May 2013 18:15:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Uer5h-0005se-M2 for pgsql-pkg-debian@arkaria.postgresql.org; Tue, 21 May 2013 18:15:17 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Uer5h-0005sZ-16 for pgsql-pkg-debian@postgresql.org; Tue, 21 May 2013 18:15:17 +0000 Received: from tyrone.bluegap.ch ([5.9.120.207] helo=klepario.bluegap.ch) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uer5a-0001oG-UC for pgsql-pkg-debian@postgresql.org; Tue, 21 May 2013 18:15:16 +0000 Received: from [10.80.16.200] ([::ffff:31.24.12.47]) (AUTH: LOGIN markus@bluegap.ch, TLS: TLSv1/SSLv3, 256bits, CAMELLIA256-SHA) by klepario.bluegap.ch with ESMTPSA; Tue, 21 May 2013 20:14:38 +0200 id 000000000105FD56.519BB98E.00006D26 Message-ID: <519BB9CB.4000501@bluegap.ch> Date: Tue, 21 May 2013 20:15:39 +0200 From: Markus Wanner User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="=_klepario.bluegap.ch-27942-1369160079-0001-2" To: Christoph Berg , Patryk Kordylewski , pgsql-pkg-debian@postgresql.org Subject: Re: Output Bug of pg_createcluster depending the used locale References: <5195FA83.9010604@imos.net> <51960ADC.3080901@bluegap.ch> <20130521035038.GD5255@msgid.df7cb.de> In-Reply-To: <20130521035038.GD5255@msgid.df7cb.de> X-Enigmail-Version: 1.4.1 X-Pg-Spam-Score: -0.3 (/) X-Mailing-List: pgsql-pkg-debian List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Precedence: bulk Sender: pgsql-pkg-debian-owner@postgresql.org This is a MIME-formatted message. If you see this text it means that your E-mail software does not support MIME-formatted messages. --=_klepario.bluegap.ch-27942-1369160079-0001-2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 05/21/2013 05:50 AM, Christoph Berg wrote: > Not sure if that's enough and we don't need to look at the encoding or > lc_* values too. Possibly we could into the cluster created to figure > out the values (postgresql.conf maybe?). I guess it depends on what you intend to display there. Thinking of pg_createcluster as a simple wrapper around initdb, I made it fit what's getting passed to initdb. In turn, trusting that to do the Right Thing (tm) - i.e. use a specific locale when explicitly given one. Or complain if locale and encoding don't match. Or if it's given nonsense entirely, i.e.: > # ./pg_createcluster --locale foo_BAR 9.2 baz > Creating new cluster 9.2/baz ... > config /etc/postgresql/9.2/baz > data /var/lib/postgresql/9.2/baz > locale foo_BAR (custom) > initdb: invalid locale name "foo_BAR" > initdb: invalid locale name "foo_BAR" > initdb: invalid locale name "foo_BAR" > initdb: invalid locale name "foo_BAR" > initdb: invalid locale name "foo_BAR" > initdb: invalid locale name "foo_BAR" > port 5435 However, it's worth noting that initdb itself is more verbose, i.e.: > # /usr/lib/postgresql/9.2/bin/initdb -D /tmp/testdb --locale de_CH.ISO-= 8859-1 --encoding Latin-1 --lc-monetary de_DE.UTF-8 > The files belonging to this database system will be owned by user "post= gres". > This user must also own the server process. >=20 > The database cluster will be initialized with locales > COLLATE: de_CH.ISO-8859-1 > CTYPE: de_CH.ISO-8859-1 > MESSAGES: de_CH.ISO-8859-1 > MONETARY: de_DE.UTF-8 > NUMERIC: de_CH.ISO-8859-1 > TIME: de_CH.ISO-8859-1 > The default text search configuration will be set to "german". > ... vs: > # pg_createcluster --locale de_CH --encoding Latin-1 --lc-monetary de_D= E.UTF-8 9.2 foo > Creating new cluster 9.2/foo ... > config /etc/postgresql/9.2/foo > data /var/lib/postgresql/9.2/foo > locale de_CH > port 5435 initdb emits useful information that pg_createcluster shouldn't hide, IMO. Especially in case the user manually specifies locale(s) and/or encoding. Of course, we could try to figure this out after the fact. However, initdb itself reporting what it uses seems the most reliable to me. While I see little use and justification in cross-checking initdb. Regards Markus Wanner --=_klepario.bluegap.ch-27942-1369160079-0001-2 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: 7bit Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQQcBAEBCgAGBQJRm7nLAAoJEOhoLRs/MemzQr8gAMc/OS9JDiISMZPL6ZH9GaHC 2LuCYwpM00o3tjU+eASpzZNhTIQ0YhYUbZTIPZvd/jt3Sh6pvF1tiI9l4NU/VZVZ 6AfcDJfh6DEQnJNn1HDKk8evnZhNup6iv3hMIM3VUQxbKs+ZEiT+GtQQLrpm0AjQ izj3Jl8BgzXDmU+yfed1L0u10bRydvrDQa8ULOH2t2hWFXT7w3528TMc9TozBPeK j2vPKc+Y5Dl7kfvnQMBgtMuacKN3aYMo8chl3/EEawTB120wXBs+bqMsfiKx2qxd 6IXqom9TUWq1gQXQ6hrleNTcLUJpciHPpAdUztjQZc6ABAtWWa4WaFZgUtdALBqK fBinD97JUUvBmA2UPCGMzgo19nmCou3AH4xV/bnEZSFB3WVPzinDyIidEicfVZIv bihekRVOmAJGKH3uEIDD/L8I9TXR6RNvbq2Pcm1eeGAJfPXw/Ajafq8EeEu4Aayy AN+0CPYXfbU4MXv+ewpZgTGxWOtH/n6sm8KiUSDsce7hoh0Niew71sEMta7liCb3 P8QXXV4MxV3dFw3sUUMOkBMRslQEkAEWx4v5xX9RVvOCY8HzGa6sotJ2TBIDBDSH IcEj3OBT30gDU+VYvJLCC8KP+cNJ8oqBxczCj6FXJas20YXRZnc3yFvPGG7byZtl uT5DA5+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