Exclusion constraints in PostgreSQL and a tricky problem
Exclusion constraints in PostgreSQL are complex, see this use case using WHERE STATUS. There are limits to what exclusion constraints can do.
Conditional foreign keys and polymorphism in SQL: 4 Methods
by
Laurenz Albe |
08.2023 This article is about the notoriously difficult problem of “conditional foreign keys”. In object-oriented programming languages, polymorphism is a […]
Killing performance with PostgreSQL partitioning
Partitioning is not without risk. It might help to handle large quantities of data, but it can also have downsides - learn how to it.
Reproducible builds: a PostgreSQL query optimization example
This post shows how to optimize a slow query that came out of the Reproducible Builds project. The Reproducible Builds […]
Subqueries and performance in PostgreSQL
by
Laurenz Albe |
07.2023 SQL allows you to use subqueries almost anywhere where you could have a table or column name. All you […]
ERROR: invalid byte sequence - Fix bad encoding in PostgreSQL
by
Laurenz Albe |
05.2023(Inscription seen on a T-shirt) It's annoying to get error messages caused by encoding problems. But it is more annoying […]
PostgreSQL ALTER DEFAULT PRIVILEGES - permissions explained
by
Laurenz Albe |
05.2023 Many people have heard that ALTER DEFAULT PRIVILEGES makes it easy to allow other users access to tables. But […]
Different from many other database systems, PostgreSQL does not support query hints. That makes it difficult to force the […]
Underscores in numeric constants in PostgreSQL 16
SQL and numeric constants NEW in PostgreSQL 16 - support for underscores in integer and numeric constants! I already wrote […]
EXPLAIN (GENERIC_PLAN): New in PostgreSQL 16
by
Laurenz Albe |
04.2023 A while ago, I wrote about how difficult it is to get an execution plan for a parameterized query. […]