Skip to content

Instantly share code, notes, and snippets.

@sagax
Last active September 29, 2019 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sagax/7659a05f320848b259a12bff29e2acda to your computer and use it in GitHub Desktop.
Save sagax/7659a05f320848b259a12bff29e2acda to your computer and use it in GitHub Desktop.
pg_restore -h 127.0.0.1 -p 5432 -U horse -d horse -v late
#
psql -U username -d basename < command.sql
psql -U username -d basename -t < command.sql
create user horsee with createdb password 'horsee';
---
CREATE DATABASE yourdbname;
CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass';
GRANT ALL PRIVILEGES ON DATABASE yourdbname TO youruser;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment