Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
Set byte-wise string comparing in postgresql

My PostgreSQL string comparison is strange. It looks like dots, commas and other non-alphabet symbols are ignored. How to change this behavior to byte-wise?

strange string compartion

pg version 12.3-1

OS Ubuntu 19-10

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The problem was in the OS locale settings, the thing is that LC_COLLATE was set in "en_US.utf8", that was the reason of such strange comparison.

Resolving:

create database with needed LC_COLLATE:

CREATE DATABASE dname WITH
OWNER oname
LC_COLLATE = 'C'
LC_CTYPE = 'en_US.utf8'
TEMPLATE = template0;

the last row needed because the default db template uses system locale

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!