Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

194
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda