大部分我都是使用pgAdmin4 操作,它是開源可以免費使用的程式,功能非常的完善,幾乎可以操作所有PostgreSQL功能,也有 Query Tool 查詢工具來執行SQL程式,不過 pgAdmin4 不是必要選項,也可以選擇別的資料庫管理系統。

上圖為 pgAdmin4 主畫面
左側 物件瀏覽器,讓你檢視伺服器、資料庫、其他物件。
上方 藍色的導航列可以選擇各種功能
右側 有各種頁籤用來顯示料庫物件及效能儀表板
因為我有重新安裝過,不確定一開始是不是這樣,假設 Servers 是空的無法點開,要新增 PostgreSQL 伺服器到左側選單中。
請先確認 Postgres.app

如圖顯示 Start 按鈕要是 灰色的,表示伺服器已啟動。
新增Server
- 建立一個 PostgreSQL Server。在 Servers 上點選右鍵->Create->Server

- General 頁籤中 設定 Server 名稱 PostgreSQL 11

- Connection 頁籤中 設定PostgreSQL Server 安裝的位置,因為我們裝在這一台電腦,所以設定 localhost 按下Save

- 左側欄Server 選項出現了 PostgreSQL 11

成功新增 Server!(上圖 Postgres 資料庫是預設的資料庫)