Re: --locale options not honoured?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 19, 2021 at 11:22 AM James B. Byrne <byrnejb@xxxxxxxxxxxxx> wrote:
I am try to create a new pg database with --locale=en_US.UTF8.

You are creating a whole new cluster., not just a database.

  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


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)


You created a new cluster, but never started it, yet were able to connect to it without a problem.  I suspect you are connecting psql to some already running existing cluster and that the cluster you initdb'd is correctly configured but just sitting there offline waiting to be started - possibly after changing its port information so it doesn't conflict with this already running instance.

David J.

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux