Xavi
Xavi

Reputation: 603

Why PostgreSQL shows times using comma as a decimal separator even if LC_NUMERIC is en_US.UTF-8

I run the following commands from the psql front-end. See how the time displayed at the end represents the decimal separator as a comma:

> \timing
Timing is on.
> show lc_numeric;
 lc_numeric  
-------------
 en_US.UTF-8
(1 row)

Time: 236,539 ms

Upvotes: 1

Views: 1237

Answers (1)

intgr
intgr

Reputation: 20496

Because these query timings are formatted on the client side, inside psql. psql uses the locale set in your environment, not the database locale on the server.

When you launch psql, just set the appropriate locale in your environment:

export LANG=en_US.UTF-8
psql

Upvotes: 2

Related Questions