Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDAQE-0006No-9Q for pgsql-admin@arkaria.postgresql.org; Fri, 19 Feb 2021 18:22:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lDAQD-0002aG-8K for pgsql-admin@arkaria.postgresql.org; Fri, 19 Feb 2021 18:22:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDAQC-0002a8-K0 for pgsql-admin@lists.postgresql.org; Fri, 19 Feb 2021 18:22:33 +0000 Received: from mx32.harte-lyne.ca ([216.185.71.32]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDAQ2-0003Ik-UB for pgsql-admin@lists.postgresql.org; Fri, 19 Feb 2021 18:22:26 +0000 Received: from mx32.harte-lyne.ca (localhost [127.0.32.1]) by mx32.harte-lyne.ca (Postfix) with ESMTP id 871DC460CE for ; Fri, 19 Feb 2021 13:22:15 -0500 (EST) X-Virus-Scanned: amavisd-new at harte-lyne.ca Received: from mx32.harte-lyne.ca ([127.0.32.1]) by mx32.harte-lyne.ca (mx32.harte-lyne.ca [127.0.32.1]) (amavisd-new, port 10024) with ESMTP id OHcBKS7mzdmV for ; Fri, 19 Feb 2021 13:22:13 -0500 (EST) Received: from webmail.harte-lyne.ca (webmail.hamilton.harte-lyne.ca [216.185.71.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx32.harte-lyne.ca (Postfix) with ESMTPSA id 8618D460C3 for ; Fri, 19 Feb 2021 13:22:13 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=harte-lyne.ca; s=dkim_hll; t=1613758933; bh=P6N+o1hTAIqI7uJ6Nx2SkLurtk/c0q5wWiK0cRXFVA0=; h=Date:Subject:From:To:Reply-To; b=kpdorSJmgupfX/uFEw1rSKkJD3FTcOh5BHZhIQqQRDcGHl+W6srxmRIuM6XFR1Sjj 9bJ0W1cTtcx03jzFeGUD+juo/rmrtOJfkOxQn7HfvhPd4y9LSiFjs9OdtWw7mNuX9N RZ9ubm5wnAMfpJ3qjNHGVPJIkjlbLYurKvJhLUSFAU4UEGB8PnqEVDMXHVKA/lYzEE vnDsNCJxYr1NHvThhtCe5keuiL8P9p2XN9VeBH7PQlVLRR7/EO3onh+DyhohTcZR8A QgVHxArvduYbzuxTFAPWMteQ5jEsYEqUiF5OPPZH1GNUs74lIW5FoVAyjqSYD45Q76 PgWv0OySvK1wQ== Received: from 216.185.71.41 (SquirrelMail authenticated user byrnejb_hll) by webmail.harte-lyne.ca with HTTP; Fri, 19 Feb 2021 13:22:13 -0500 Message-ID: Date: Fri, 19 Feb 2021 13:22:13 -0500 Subject: --locale options not honoured? From: "James B. Byrne" To: pgsql-admin@lists.postgresql.org Reply-To: byrnejb@harte-lyne.ca User-Agent: SquirrelMail/1.4.23 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk FreeBSD 12.2-RELEASE-p3 postgresql13-server-13.1_1 I am try to create a new pg database with --locale=en_US.UTF8. However initdb does not seem to actually carry out the instructions. I have tried this with and without the --lc-collate and lc-ctype options. The result is the same. sudo -u postgres initdb --locale=en_US.UTF-8 --lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8 -D /var/db/postgres/data13 could not change directory to "/root": Permission denied 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 locale "en_US.UTF-8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english". Data page checksums are disabled. creating directory /var/db/postgres/data13 ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Canada/Eastern creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok psql -U postgres template1 psql (13.1) Type "help" for help. template1=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+----------+---------+-------+----------------------- postgres | postgres | UTF8 | C | C | template0 | postgres | UTF8 | C | C | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | C | C | =c/postgres + | | | | | postgres=CTc/postgres (3 rows) On another (9.6) host I see this: template1=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges ---------------------+-----------------------+----------+-------------+-------------+----------------------- postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | postgres=CTc/postgres+ | | | | | =c/postgres Why are not the collating sequence and Ctype set to UTF-8? How do I get the locale specified completely? -- *** e-Mail is NOT a SECURE channel *** Do NOT transmit sensitive data via e-Mail Unencrypted messages have no legal claim to privacy Do NOT open attachments nor follow links sent by e-Mail James B. Byrne mailto:ByrneJB@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3