Trying to quit with \q; gives an error:

postgres=# \q;
Invalid command \q;. Try \? for help.

Need to drop the ;