Databases

Backup PostgreSQL …

If you’re using a PostgreSQL database and need to backup the database schema, this article will walk through some of the handy scripts I use to backup and restore a database schema. I like to use Docker for everything, especially for my development environment. I can easily automate my …

Dynamic PostgreSQL WHERE …

If you’re working with arrays of data in PostgreSQL this post will walk through a quick and simple solution to create dynamic WHERE IN database queries using arrays for PostgreSQL. Some of the syntax might be helpful for other databases and libraries as well. The Problem Here’s the …

Upsert in PostgreSQL …

If you’re using Postgres and need to make an update to a row OR create a new row if one doesn’t exist, new versions of PostgreSQL make this a lot easier. In other databases this concept is usually referred to as upsert which is short for update / insert. Let’s see a full example, …