1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-02 17:15:38 +02:00

Update psql.md

This commit is contained in:
Artem Szubowicz 2015-12-30 14:07:35 +01:00
parent 95fc5a0ef9
commit f4bd38bd8a

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}}`