Question: Say I need hand write some queries in the console, what's the most efficient way of executing multiline queries like `CREATE TABLE` statements?

I am used to using Microsoft Management Studio, but I now find myself having to learn about PostgreSQL on the fly.

Answer: 
You can use this syntax in bash (.sh file):

```sh
psql postgres://postgres:postgres@localhost:5432/postgres << SQL
ALTER TABLE table DISABLE TRIGGER all;
TRUNCATE table;
ALTER SEQUENCE table_id_seq RESTART WITH 1;
SQL

```
You can write the query to a temp file and execute it with `psql -f /path/to/temp/file`