Table bloat revisited: Making tables shrink in PostgreSQL
UPDATED Understand table bloat. Why deleting data from a table in a PostgreSQL database does not always shrink files on disk.
Common mistakes: UNION vs. UNION ALL
In my role as a PostgreSQL consultant and trainer there are a couple of issues, which pop up on a […]
Reducing the number of columns with bit
How to reduce the number of columns using bitfields in PostgreSQL. "bit” can be used just as a normal char data type.
Time in PostgreSQL: Outer joins
UPDATED Aug 2023: How to use “generate_series” in an outer join: Use PostgreSQL to aggregate data on an hourly basis.
Time in PostgreSQL: The simple way
UPDATED Aug. 2023: How to process time in PostgreSQL: timeseries & generate_series, day constants, add and subtract from a time interval.
CREATE TABLE – the fancy way with LIKE
The LIKE keyword: Using LIKE is especially useful if you want to clone tables which have dozens of indexes and constraints.
Kostal Pico to PostgreSQL
As there is hardly code available on the net showing how to access Kostal Pico, I decided to publish this one.
GIN - Just A Kind Of Index
GIN stands for Generalized Inverted Index. Find out how data is organized within a PostgreSQL GIN index vs a B-Tree index e.g.
PostgreSQL 9.3: "One line - one standby"
pg_basebackup for PostgreSQL: You'll see that the call itself already has all the info a user needs to write a simple recovery.conf file.
Removing duplicates in PostgreSQL
Today somebody asked me how to remove duplicates which accidentally made it into a table. The problem is: A normal […]