Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 4C80EB5DBE1 for ; Wed, 15 Jun 2011 11:05:26 -0300 (ADT) 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 92150-07 for ; Wed, 15 Jun 2011 14:05:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 9331DB5D94C for ; Wed, 15 Jun 2011 11:05:19 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p5FE5Hif027319; Wed, 15 Jun 2011 10:05:17 -0400 (EDT) To: Gary Wong cc: pgsql-bugs@postgresql.org Subject: Re: Postgresql 9.0.4 initdb bug on solaris 64 bit In-reply-to: References: Comments: In-reply-to Gary Wong message dated "Tue, 14 Jun 2011 10:08:21 -0700" Date: Wed, 15 Jun 2011 10:05:17 -0400 Message-ID: <27318.1308146717@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/114 X-Sequence-Number: 30493 Gary Wong writes: > [Environment under in the postgres account] > $ env > LC_MONETARY=en_US.ISO8859-15 > LC_TIME=en_US.ISO8859-15 > LC_MESSAGES=C > LC_CTYPE=en_US.ISO8859-1 > LC_COLLATE=en_US.ISO8859-15 > LC_NUMERIC=en_US.ISO8859-15 > [Message I get when I run initdb] > $ initdb -D /usr/local/pgsql/data > The files belonging to this database system will be owned by user > "postgres". > This user must also own the server process. > The database cluster will be initialized with locales > COLLATE: en_US.ISO8859-15 > CTYPE: en_US.ISO8859-1 > MESSAGES: C > MONETARY: en_US.ISO8859-15 > NUMERIC: en_US.ISO8859-15 > TIME: en_US.ISO8859-15 > The default database encoding has accordingly been set to LATIN1. > initdb: encoding mismatch > The encoding you selected (LATIN1) and the encoding that the > selected locale uses (LATIN9) do not match. This would lead to > misbehavior in various character string processing functions. > Rerun initdb and either do not specify an encoding explicitly, > or choose a matching combination. This is not a bug. You've got inconsistent environment settings, and the error message seems reasonably appropriate for that. Try making LC_CTYPE match the rest. regards, tom lane