Simple Postgres Commands I always forget

Here are some simple Postgres commands that I almost always forget

I am a simple man with simple needs. Here are the Postgres commands I use most often that I always forget so have written them here.

  • Connecting in locally – psql -d db_name
  • Listing databases – \l
  • Listing tables – \d
  • Listing schemas - \dn
  • Connecting to a different table – \c
  • Getting help with these \ commands – \?
  • Quitting – \q

I fully expect I will be the only reader of this post!

Recent posts View all


How to ignore Bullet in RSpec tests

Using Bullet during a test can pick up mistakes but also has false negatives; here is an easy way to ignore them


How we used Nokogiri to fix a sizing issue in YouTube's oEmbed

At some point, one of our calls to YouTube's oEmbed endpoint was returning videos way too small; we fixed in in our Rails application by using Nokogiri