我想要psql
格式很好,並遵循文檔here。現在,每當我對包含大量列的表執行查詢時,無論我的屏幕有多大,每行都會溢出到下一行,併產生整個屏幕上不可讀的垃圾。PostgreSQL的psql終端命令
文檔(鏈接在上面)說,有一種方法可以很好地對齊列以獲得更多可讀的輸出。
通常情況下,開始psql
,我只需要輸入:
psql
,打輸入。現在,我想:
psql \pset format aligned
,卻得到了錯誤:
could not change directory to "/root"
psql: warning: extra command-line argument "aligned" ingored
psql: FATAL: Indent authentication failed for user "format"
任何想法,我怎麼能拿這些命令行參數來爲我工作?
在Ubuntu 13/10上:sudo -u postgres psql。然後\ c在交互式shell中導致「您現在連接到數據庫」postgres「作爲用戶」postgres「。 – Timo