Skip to content

Instantly share code, notes, and snippets.

@xird
xird / psql.md
Last active January 16, 2022 15:30 — forked from cimmanon/psql.md
PostgreSQL cheat sheet for MySQL users

I use PostgreSQL via the psql client. If you use a different client (eg. pgAdmin, etc.), I don't know how much will translate over.

One nice difference between psql and mysql (cli) is that if you press CTRL+C, it won't exit the client.

User administration

Login as superuser (via shell)

psql -U postgres