#​434 — December 8, 2021

Web Version

Postgres Weekly

pg_graphql: A GraphQL Extension for Postgres — The Supabase team has open sourced an extension (still a work in progress, they admit) that adds GraphQL support to Postgres with things like schema generation and query parsing kept entirely within the confines of your database server and not some external service (though Postgraphile is a fine option in that regard).

Oliver Rice (Supabase)

Understanding GIN Indexes: The Good and the Bad — Using fancy data types, JSONB documents, and want to index? Skip B-tree indexes and head straight for the GIN ;-) Lukas covers what GIN indexes (introduced into Postgres almost 15 years ago now) are useful for and some potential pitfalls.

Lukas Fittl

Develop a Faster Way to Work. Build Internal Tools, Remarkably Fast — Custom dashboards, admin panels, CRUD apps—build any internal tool faster in Retool. Get started for free today.

Retool sponsor

IN BRIEF:

pgFormatter 5.2: A Tool to Format SQL Code — You can test it out online, or you can grab the source from GitHub (it’s written in Perl) and run it for yourself.

MigOps

Tricks for Faster Spatial Indexes with PostGIS — If you’re storing information about geographical areas, there’s potential for a lot of overlap which can make indexes less efficient than they could be. Paul explains how spatial indexes can be sensitive to the order of their inputs and how to mitigate problems.

Paul Ramsey

Compressing pgdump Dumps with xz“A not-scientific look at how to compress a set of SQL dumps,” says Luca who observes that most SQL dumps are highly compressible due to their textual nature. He uses xz, a tool that can achieve higher compression rates than standard gzip to compress said dumps with much success.

Luca Ferrari

🧹 5 Data Cleaning Techniques to Perform in Your PostgreSQL Database

Timescale sponsor

Some Basic Indexing Best Practices — Some reasonably elementary advice, mostly oriented around not over indexing and choosing your indexing battles wisely.

Michael Christofides

Using pg_rewrite for Tidier Table Partitioningpg_rewrite is an extension from Cybertec that can turn a non-partitioned table into a partitioned one with ‘almost no locking.’

Hans-Jürgen Schönig

DBDoc: Database Schema Documenter — A tool (written in Clojure) that provides a simple way to add documentation to your tables. You describe tables in a simple text file and this is then applied as comments onto your actual tables in the database making them viewable in tools like psql, DBeaver, Postico, etc.

Micah Elliott