Photo by Glenn Carstens-Peters on Unsplash

We can define a before and an after about Partitioning in Postgres. The seismic shift occurred in PG 10 (2017) when the declarative partitioning approach first appeared.

The approach for partitioning before PG 10 was very cumbersome to implement and to maintain, that is not the case for the new approach.

From PG 10 till now, every PG release has improved the DDL and the functionalities that we’ll cover now.

Getting to know the Basic partitioning DDL

This was the new approach that PG 10 allowed us to use, which permit us to partition according to a range, for example…


Today is the time to talk about the great ENUM type.

The problem is the following, you need to categorize all your animals (aka beasts) by its moods in every moment.

So you come out with this easy to make table:

Miguel Barrera

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store