Postgres - nimrody/knowledgebase GitHub Wiki

Internals

Using

  • Postgres Exercises

  • Postgres tips for time series queries

  • Show config file location SHOW config_file;

  • pg_hba.conf for password authentication (local entries are for unix sockets, host are for tcp access). You need to access the database using psql -h127.0.0.1 -Uuser --password

    local all postgres peer
    local all all peer
    host all all 127.0.0.1/32 md5
    host all all ::1/128 md5
    local all all md5

  • Command line password: PGPASSWORD=xxxx psql -U username databasename or psql postgresql://user:password@host/dbname

Use cases