Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

197
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda