Update psql.md

waldyrious/alt-syntax
Artem Szubowicz 2015-12-30 14:07:35 +01:00
parent 95fc5a0ef9
commit f4bd38bd8a
1 changed files with 5 additions and 1 deletions

View File

@ -6,10 +6,14 @@
`psql {{database}}`
- Connect to *database* on given server *host* running on given *port* with *username* given
- Connect to *database* on given server *host* running on given *port* with *username* given, no password prompt
`psql -h {{host}} -p {{port}} -U {{username}} {{database}}`
- Connect to *database*, user will be prompted for password
`psql -h {{host}} -p {{port}} -U {{username}} -W {{database}}`
- Run single *query* against the given *database*. Note: useful in shell scripts
`psql -c '{{query}}' {{database}}`