Recent Posts

(TIL) PSQL: Get The Size Of A Table

less than 1 minute read

With the pg_relation_size() function, we can get the size of a given table. For instance, if we’d like to see the size of the reservations table, we can by e...

(TIL) PSQL: Dump a database

less than 1 minute read

Using the pg_dump with the -Fc flag will create a dump of the given database in a custom format. The output of this command can be redirected into a file (th...

(TIL) PSQL: Get The Size Of A Database

less than 1 minute read

If you have connect access to a PostgreSQL database, you can use the pg_database_size() function to get the size of a database in bytes.

(TIL) PSQL: Change The Current Directory

less than 1 minute read

When you start a psql session, your current directory is what psql will use as its current directory. This is important for meta-commands that use relative p...

(TIL) PSQL: Auto Expanded Display

less than 1 minute read

By default, postgres has expanded display turned off. This means that results of a query are displayed horizontally. At times, the results of a query can be ...