回答
psql -d postgres
這裏-d
代表數據庫名,因此postgres
是你的數據庫名稱。
可以通過只輸入psql
打開終端,上面的語句會做兩件事情你
- 打開PSQL終端
- 連接你
postgres
分貝
更多PSQL選擇你可以參考https://www.postgresql.org/docs/current/static/app-psql.html
謝謝@satendra,只是想確認'postgres'本來可以是任何名字的嗎? – stackjlei
是@stackjlei它可以是任何名稱。 – Satendra
它仍然需要是現有的數據庫名稱。 – Mokadillion
- 1. 什麼是postgres,psql?
- 2. sudo -u postgres psql和sudo psql -U postgres有什麼區別?
- 3. tr -d [=,=]做什麼?
- 4. 在Unix中'-d'做什麼?
- 5. 'print'%d「%(5)」的結局叫做什麼?
- 6. 爲什麼Postgres在使用psql時不提示輸入密碼?
- 7. 更新衝突什麼都不做postgres
- 8. Postgres的:管道給psql
- 9. 什麼是gsub(/(\ d {4})\ /(\ d \ d)\ /(\ d \ d)\ /(。*)/,'\ 1- \ 2- \ 3- \ ) 意思?
- 10. 爲什麼我不能用postgres做任何事情?
- 11. 爲什麼來自Ruby續集和Postgres psql的時區信息有所不同?
- 12. 「npm -d install」中的「-d」是什麼?
- 13. testAndroidTestCaseSetUpProperly做什麼
- 14. Psql提供Postgres在Firefox中的訪問
- 15. 如何設置Postgres psql的時區?
- 16. psql org.postgresql.util.PSQLException:FATAL
- 17. 使用「psql -U postgres」,它告訴我「角色postgres不存在」?
- 18. HTML下拉箭頭?我究竟做錯了什麼? D:
- 19. windbg命令「d esp」究竟做了什麼?
- 20. 爲什麼Brew在這裏安裝postgres?
- 21. 爲什麼我無法登錄到Postgres?
- 22. 爲什麼\ d \ +或\ d +在這裏不等於\ d *?
- 23. 是什麼`(無效)的D'
- 24. 在Postgres函數調用中@做了什麼?
- 25. Postgres浮點數學 - 我需要做什麼特別的嗎?
- 26. 用什麼用戶我應該做postgres和php查詢
- 27. WPF能做什麼和不做什麼?
- 28. 在Perl中做什麼=〜做什麼?
- 29. 這是什麼「加入」在做什麼?
- 30. [context assignObject:toPersistentStore]做什麼?
'psql --help' [或手冊](https://www.postgresql.org/docs/current/static/app-psql.html)會告訴你ü –