Skip to content

Instantly share code, notes, and snippets.

@maxcelos
Created October 10, 2018 14:23
Show Gist options
  • Save maxcelos/70736748ca5d95f31ccbf297807e4904 to your computer and use it in GitHub Desktop.
Save maxcelos/70736748ca5d95f31ccbf297807e4904 to your computer and use it in GitHub Desktop.
sudo -u postgres psql -c "CREATE USER some_user WITH ENCRYPTED PASSWORD 'some_password'" -d template1

sudo -u postgres psql -d nominatim -c "GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO some_user"
sudo -u postgres psql -d nominatim -c "ALTER DEFAULT PRIVILEGES FOR USER marcelo IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO some_user;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment