Questions tagged [locales]

16 questions
20
votes
3 answers

PostgreSQL: difference between collations 'C' and 'C.UTF-8'

In PostgreSQL, what is the difference between collations C and C.UTF-8? Both show up in rows of pg_collation. Is it perhaps the case that C.UTF-8 is the same as C with encoding UTF-8 regardless or what the actual encoding of a database is?
rookie099
  • 368
  • 1
  • 2
  • 9
5
votes
2 answers

How can I get a list of locales in PostgreSQL?

I want to change number and currency format using something like: SET lc_numeric='en_AU.UTF-8' SET lc_money='en_AU.UTF-8' I tried a number of formats for, say, Dutch, but nothing works. It appears that I don’t have that locale on my operating…
Manngo
  • 3,065
  • 10
  • 38
  • 61
4
votes
1 answer

What specifically do locale settings do, and is there a way for me to test the effects of different locales?

I might need to change the locales settings of lc_messages, lc_monetary, lc_numeric, lc_time in my postgresql config. However, I need to know what specifically they affect before I do that. The postgresql documentation gives a list of what's…
4
votes
2 answers

Specific changes to glibc 2.28 that affect PostgreSQL

I am preparing for upgrading a PostgreSQL server to Debian 10 (Buster) with the warning from Debian release notes about changes to gclibc affecting PostgreSQL in mind. The PostgreSQL wiki provides two specific strings that will be sorted differently…
rookie099
  • 368
  • 1
  • 2
  • 9
3
votes
5 answers

Locale is incompatible error in Postgresql 10 when replicating from Ubunu to Win 10

The locale available in my Ubuntu PG-10 DB is en_US.UTF-8. When doing PG_Basebackup to a PG-10 DB in Win-10, Psql failed to connect with error psql: FATAL: database locale is incompatible with operating system DETAIL: The database was…
user1624300
  • 31
  • 1
  • 2
2
votes
1 answer

postgres: do I really need to use Collate and Ctype when restoring database?

Need to import in Linux a Windows postgres exported database. In windows it's listed as follows: Name | Owner | Encoding | Collate | Ctype | Access…
catalin
  • 123
  • 5
2
votes
0 answers

Problem with decimal point setting in Windows

I am using bcp.exe from a SQL Server 2017 installation on Windows 10 (build 19041). The OS language is English (US) but I use scandinavian settings for date, time, currency and decimal delimiter - the decimal delimiter is a comma (,) not a point…
2
votes
1 answer

Storage and presentation of database data across multiple languages

Apologies if this has been asked before. After extensive searching I cannot find anything that serves as a solution (a similar answer is posted below). I am afraid this is an open-ended (broad) question simply because I don't know what I don't…
EvilDr
  • 860
  • 4
  • 14
  • 29
1
vote
0 answers

Unable to change Locale settings on Postgres@16 on Mac

I've installed PostgreSQL 16 via homebrew, which result installed at /opt/homebrew/var/postgresql@16. The default database was initialised via homebrew, so I had no chance to setup the locale which - as per the conf file - is the to C (or Current as…
Andrea Moro
  • 255
  • 2
  • 4
  • 14
1
vote
2 answers

Why is the default collation not applied in PostgreSQL queries?

OS: Windows 10 Docker OS: Alpine Linux 3.18.3 DB: PostgreSQL 15 I created a new PostgreSQL database named test1 with zh-x-icu as the default collation using the following command: postgres=> create database test1 with encoding 'UTF8' owner…
David H. J.
  • 111
  • 3
1
vote
1 answer

pg_trgm not working on non-Latin and macOS

Trigrams don't work for non-Latin languages on the Mac. On the Mac, I'm getting the following behavior: select show_trgm('peace') -> {" p"," pe",ace,"ce ",eac,pea} select show_trgm('über') -> {0xb1fa7d,0x0d7f89,0x4f84fe,ber,"er "} select…
Tomer
  • 111
  • 2
1
vote
0 answers

Difference between LC_COLLATE='C' and LC_COLLATE='C.UTF-8' in PostgreSQL

I need guidance on the exact distinction, if any, between LC_COLLATE='C' and LC_COLLATE='C.UTF-8' in PostgreSQL. It seems to me that they behave exactly the same and that the codeset (with bearing on character classification for character-case…
rookie099
  • 368
  • 1
  • 2
  • 9
1
vote
1 answer

Change locale of Postgres server

I have a big Postgres server with 2 Tb of data that has been created with the wrong locale. How can I correct it, without recreating the whole server with pg_dump and pg_restore. It would take a longtime to do so, and would need a lot of disk…
david.perez
  • 275
  • 2
  • 18
0
votes
1 answer

'lc_time_names' can't be set to the value of 'de_DE'

Works: SET lc_time_names='en_US'; Fails with "Variable 'lc_time_names' can't be set to the value of 'de_DE'": SET lc_time_names='de_DE'; This seemed simple to me. I guess, I have to install that locale but no search for "mariadb install locale" or…
Leif
  • 105
  • 2
0
votes
1 answer

Default value format of a stored procedure parameter(of datatype : money)

With my query: SELECT (CAST(0.00 AS MONEY)) I am expecting a result : 0.00 But it shows me the result: 0,00(with comma) I checked this query ,when i found that,the CREATE PROCEDURE script displays the default value as [money] = 0,0000, for one…
minijebu
  • 11
  • 2
1
2