From: | Debraj Manna <subharaj(dot)manna(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Default locale in postgres |
Date: | 2018-07-13 18:50:54 |
Message-ID: | CAF6DVKNho8jr=poGgEnvOcgfV_Ma0kYrKBgEsQWRYKMt3cSu0Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Thanks Tom for replying.
support(at)vrni-platform-release:~$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
My locale settings are like above. But I am seeing is C picked by postgres.
Any idea why it is picking C instead of en_US.UTF-8. I am on Ubuntu 14 and
postgres 9.5.4. In initdb I am just passing encoding as UTF-8 and data
checksum as enabled.
support(at)vrni-platform-release:~$ psql -l -U postgres -h localhost
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
vnera | postgres | UTF8 | C | C |
(4 rows)
On Fri, Jul 13, 2018 at 11:56 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Debraj Manna <subharaj(dot)manna(at)gmail(dot)com> writes:
> > Can someone let me know if I am not passing any locale while doing initdb
> > what locale (Collate & Ctype) will postgres 9.5.4 pick?
>
> Whatever is the prevailing default in initdb's environment ---
> see LANG and LC_XXX environment variables.
>
> If none of those are set, I imagine it'll fall back to C locale,
> though this choice is possibly dependent on your local libc.
> "man locale" might be informative.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-07-13 20:57:39 | Re: Default locale in postgres |
Previous Message | Tom Lane | 2018-07-13 18:26:08 | Re: Default locale in postgres |