Blog

Page 64 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for How to find duplicate records in PostgreSQL
duplicates

How to find duplicate records in PostgreSQL

Published on September 2, 2023

šŸ” How to Find Duplicate Records in PostgreSQL šŸ” So, you've got a PostgreSQL database table with some duplicate records that are causing a bit of trouble. Don't worry, we're here to help you find and tackle those pesky duplicates! 🦾 The first thing you

Cover Image for Update multiple rows in same query using PostgreSQL

Update multiple rows in same query using PostgreSQL

Published on September 2, 2023

# Updating Multiple Rows in One Go Using PostgreSQL šŸ’Ŗ Updating multiple rows in PostgreSQL can be a bit tricky, but fear not! We've got you covered with easy solutions to this common problem. In this blog post, we'll explore how you can update multiple r

Cover Image for How to create User/Database in script for Docker Postgres

How to create User/Database in script for Docker Postgres

Published on September 2, 2023

šŸ“ **Tech Blog Post: How to Create User/Database in Script for Docker Postgres** Are you struggling to set up a custom user and database in a Docker Postgres container? Don't worry, I've got you covered! 🐘🐳 ## The Challenge When using the official Pos

Cover Image for Extract date (yyyy/mm/dd) from a timestamp in PostgreSQL
castingtimestamp

Extract date (yyyy/mm/dd) from a timestamp in PostgreSQL

Published on September 2, 2023

# How to Extract the Date from a Timestamp in PostgreSQL So you have a timestamp in PostgreSQL, but you only need the date part. Maybe you want to insert it into another table that expects a `DATE` value. Don't worry, we've got you covered! In this guide,

Cover Image for Create unique constraint with null columns
null

Create unique constraint with null columns

Published on September 2, 2023

# Creating a Unique Constraint with Null Columns in PostgreSQL Hey there! šŸ‘‹ Are you facing an issue with creating a unique constraint in PostgreSQL? Look no further, because I've got you covered! In this blog post, we'll address a specific problem where

Cover Image for How to generate the "create table" sql statement for an existing table in postgreSQL

How to generate the "create table" sql statement for an existing table in postgreSQL

Published on September 2, 2023

# How to Generate the "CREATE TABLE" SQL Statement for an Existing Table in PostgreSQL 🐘 So, you created a table in PostgreSQL, but now you find yourself in a pickle. You want to take a peek at the SQL statement used to create the table, but you're scrat

Cover Image for How to persist data in a dockerized postgres database using volumes

How to persist data in a dockerized postgres database using volumes

Published on September 2, 2023

šŸ“ How to Persist Data in a Dockerized Postgres Database Using Volumes šŸ“¦šŸ’¾ Are you struggling to persist data in your Dockerized Postgres database? 😩 Don't worry, we're here to help! In this blog post, we'll address a common issue and provide easy solut

Cover Image for How to list active connections on PostgreSQL?

How to list active connections on PostgreSQL?

Published on September 2, 2023

# How to List Active Connections on PostgreSQL Are you facing the frustrating issue of not being able to drop a database in PostgreSQL because there are active connections to it? Don't worry, we've got you covered! In this article, we'll show you how to l

Cover Image for How to UPSERT (MERGE, INSERT ... ON DUPLICATE UPDATE) in PostgreSQL?

How to UPSERT (MERGE, INSERT ... ON DUPLICATE UPDATE) in PostgreSQL?

Published on September 2, 2023

# How to UPSERT (MERGE, INSERT ... ON DUPLICATE UPDATE) in PostgreSQL? šŸ“ Hey there tech enthusiasts! Today we're diving into the thrilling world of PostgreSQL and tackling a frequently asked question: How do you perform an UPSERT operation in PostgreSQL?

Blog | Matheus Mello