Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 834C11336FA7 for ; Sun, 20 Mar 2011 04:37:54 -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 63025-07 for ; Sun, 20 Mar 2011 07:37:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og123.obsmtp.com (exprod7og123.obsmtp.com [64.18.2.24]) by mail.postgresql.org (Postfix) with ESMTP id 89C5B133655C for ; Sun, 20 Mar 2011 04:37:46 -0300 (ADT) Received: from source ([209.85.215.176]) (using TLSv1) by exprod7ob123.postini.com ([64.18.6.12]) with SMTP ID DSNKTYWuyaTWcY0EaaBEfS/GKr/R5bItI+rF@postini.com; Sun, 20 Mar 2011 00:37:47 PDT Received: by eya28 with SMTP id 28so1511628eya.35 for ; Sun, 20 Mar 2011 00:37:44 -0700 (PDT) Received: by 10.14.11.129 with SMTP id 1mr634341eex.43.1300606662426; Sun, 20 Mar 2011 00:37:42 -0700 (PDT) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id u45sm1060072eeh.9.2011.03.20.00.37.40 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 20 Mar 2011 00:37:41 -0700 (PDT) Message-ID: <4D85AEC4.1010703@enterprisedb.com> Date: Sun, 20 Mar 2011 09:37:40 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11 MIME-Version: 1.0 To: Tom Lane CC: pgsql-docs@postgreSQL.org Subject: Re: Ordering of sections in chapter 22 (Localization) References: <16750.1300604795@sss.pgh.pa.us> In-Reply-To: <16750.1300604795@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.2 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201103/107 X-Sequence-Number: 6540 On 20.03.2011 09:06, Tom Lane wrote: > I'm wondering why chapter 22 discusses locales (and now collations) > before encodings. ISTM the logical order is the reverse, because > encodings can be explained without reference to locales, but it's very > difficult to cover locales without touching on encodings. There are a > lot of forward references in sections 22.1 and 22.2 as it stands. > So I'd like to flip this around --- any objections? I only see these two forward references: In 22.1.1: > If more than one character set can be used for a locale then the specifications can take the form language_territory.codeset. For example, fr_BE.UTF-8 represents the French language (fr) as spoken in Belgium (BE), with a UTF-8 character set encoding. In 22.2.2: > Also, a collation is tied to a character set encoding (see Section 22.3). The same collation name may exist for different encodings. To me, it feels natural to discuss locales and collations first. They are a higher level feature, they affect query results and there's new syntax for collations. Encoding is just an implementation detail, you just have to set client and server encodings correctly to match your locale and the OS or application. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com