Recent Posts

PSQL: Insert Just The Defaults

less than 1 minute read

If you are constructing an INSERT statement for a table whose required columns all have default values, you may just want to use the defaults. In this situat...

PSQL: Generate Series Of Numbers

less than 1 minute read

Postgres has a generate_series function that can be used to, well, generate a series of something. The simplest way to use it is by giving it start and stop ...

PSQL: Export Query Results To A CSV

less than 1 minute read

Digging through the results of queries in Postgres’s psql is great if you are a programmer, but eventually someone without the skills or access may need to c...

PSQL: Clear The Screen In psql

less than 1 minute read

The psql interactive terminal does not have a built-in way of clearing the screen. What I usually do if I really need the screen cleared is quit, run clear f...

PSQL: Storing Emails With citext

less than 1 minute read

Email addresses should be treated as case-insensitive because they are. If a user is trying to sign in with their email address, we shouldn’t care if they ty...