Recent Posts

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...

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.

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...

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 ...