Skip to content

Instantly share code, notes, and snippets.

View thesensei254's full-sized avatar
💭
Overdrive on code

Ngondo thesensei254

💭
Overdrive on code
  • CEREBRO
  • Mexico City
View GitHub Profile
@thesensei254
thesensei254 / pg_hba.conf
Created September 9, 2020 18:56 — forked from 64kramsystem/pg_hba.conf
PostgreSQL 10 default pg_hba.conf
# PostgreSQL Client Authentication Configuration File
# ===================================================
#
# Refer to the "Client Authentication" section in the PostgreSQL
# documentation for a complete description of this file. A short
# synopsis follows.
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access. Records take one of these forms:
@thesensei254
thesensei254 / postgres-cheatsheet.md
Created April 14, 2020 19:00 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)