RSSAmplifier

Blog

PostgreSQL Notes - Daniel Vérité

A blog about working with PostgreSQL.

postgresql.verite.proRSS feed ↗10 posts

Latest posts

Producing UUIDs Version 7 disguised as Version 4 (or 8)

When communicating UUID-v7 values to third parties, the creation dates inside them are leaked. In this post, let's see how to encrypt the timestamp to solve that problem.

Pipelining in psql (PostgreSQL 18)

the psql client version 18 comes with pipelining, which can speed up client-server communication. In this post, let's see how it works and how much can be gained in query throughput with a simple example.

What Unicode versions do we use?

With three locale providers (libc, icu and builtin), a PostgreSQL instance has potentially three different versions of Unicode at the same time. In this post, let's see when it matters and how to find which Unicode versions we are using.

Implementing UUIDs v7 in pure SQL

In May 2024, the IETF standard on UUIDs (Universally Unique IDentifiers) has been updated with RFC 9562, finally officializing the UUID Version 7. This version is known to be a much better choice for database indexes than previous ones, since it has values generated consecutively already sorted. PostgreSQL does not yet have a built-in function to generate UUIDs v7, but of course several extensions…

Looking at the new built-in collation provider in PostgreSQL 17

Among the novelties of PostgreSQL 17, recently released in beta, there’s a built-in UTF-8 locale and collation with binary string comparisons. In this post, let’s see why it’s interesting, how to use it and how it performs.

Advanced psql scripting with coproc

In this post, let’s see how to control psql from outside with the coproc functionality in bash.

Using binary-sorted indexes

In a previous post, I mentioned that Postgres databases often have text indexes sorted linguistically rather than bytewise, which is why they need to be reindexed on libc or ICU upgrades. In this post, let’s discuss how to use bytewise sorts, and what are the upsides and downsides of doing so.

Global search inside a database

Let's implement a search function that can look for something into all columns of all tables.

The collation versioning problem with ICU 73

A versioning bug in the ICU 73 release might affect people that use ICU collations with Postgres. Let's explain the issue and see what to do about it.

Using traditional calendars with ICU

How to use alternative date and time types to use non-gregorian calendars with ICU.