浏览代码

Update psql.md

Artem Szubowicz 9 年之前
父节点
当前提交
f4bd38bd8a
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      pages/common/psql.md

+ 5 - 1
pages/common/psql.md

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