PostgreSQL: Add columns to a query table with variables
Posted 3rd July 2020
Generate a new column in your PostgreSQL database query from data in other columns or other tables.
PostgreSQL: Store a PSQL COUNT query result as a Bash variable
Posted 5th June 2018
Use this nifty code to isolate the result of a PSQL COUNT query as a variable within a Bash script.
Create a non-superuser role in PostgreSQL
Posted 18th April 2018
Use this easy procedure to establish a non-superuser role in PostgreSQL.
Export a PostgreSQL query to a CSV
Posted 24th November 2017
Export the contents of a database table to a CSV file using the psql PostgreSQL utility in PuTTY.