Skip to content
Home SE
Projects Open source Developer tools

custom-postgres

A multi-arch PostgreSQL Docker image with Turkish locale (tr_TR.UTF-8) and pgvector: correct sorting, İ/ı case mapping and case-insensitive search.

  • PostgreSQL
  • Docker

Why?

The official postgres image ships with the en_US.utf8 locale and does not know Turkish. Case conversion, case-insensitive search and sorting give wrong results on Turkish text; the application does not fail, it just returns the wrong rows. This image initialises the database with Turkish rules and comes with pgvector ready.

Compared with the official image

  • upper('istanbul'): ISTANBUL in the official image, İSTANBUL here
  • lower('IŞIK'): işik in the official image, ışık here
  • 'IŞIK' ILIKE 'ışık': false in the official image, true here
  • Sorting: Çağla no longer jumps ahead of Cem; Cem, Ceren, Çağla, Dilek, Irmak, Işık, İnci
  • pgvector: the vector extension is installed and enabled

Features

  • Built on the official postgres image
  • linux/amd64 and linux/arm64
  • Debian (bookworm) and Alpine variants
  • Ready for applications that search and sort Turkish text

Usage

docker run -d --name postgres -e POSTGRES_PASSWORD=secret -p 5432:5432 sineld/custom-postgres

Published publicly on Docker Hub.

More projects