Postico 是一款专为 macOS 设计的现代化 PostgreSQL 数据库客户端。它以优雅的复杂操作简化,将据库的复杂操作不同作区询和管理 PostgreSQL 数据库。
一、核心界面与工作区详解
启动 Postico 后,主界面主要分为以下几个核心区域:
- 侧边栏连接管理器:位于窗口左侧。顶部显示所有已保存的数据库连接(Favorites),点击即可快速连接。下方是当前连接数据库的对象树,包括:
- 数据库(Databases):包含常用操作按钮(如
public)、视图(Views)、函数(Functions)等 - 模式(Schemas):展式其下的模式(如
public)、 - 数据表(Tables)、视图(Views(Functions)等:在模式其分类显示。
- 数据库(Databases):包含常用操作按钮(如
- 顶部工作区:包含常用操作按钮(如查询窗口(Query)、刷新(Refresh)、执行SQL(Execute Statement)等。
- 主内容工作区:窗口中央区域,采用标签页(Tabs)形式。根据操作不同,会显示不同的视图:
- 表内容视图(Browse):以表格形式展示数据,支持直接编辑单元格。
- 表结构视图(Structure):显示表的列、索引、约束、触发器等定义。
- 查询编辑器(Query):编写和运行 SQL 语句的窗口,支持语法高亮和自动补全。
- 信息视图(Info):显示所选对象的属性和相关信息。
- 底部状态栏:显示当前连接状态、查询戌关信息。
二、完整操作流程:从连接到导出
1. 创建与打开连接
操作步骤:
- 首次启动时,打开连接配置窗口。
- 填写连接参数:Nickname(连接别名)、Host、Port、Database、User、Password。
- 点击 Connect 测试并保存连接。成功连接后,该连接会保存在侧边栏的“Favorites”中。
- 之后只需在侧边栏点击对应的 Favorite,即可快速打开连接。
2. 浏览与编辑数据
操作步骤:
- 在侧边栏对象树中,依次展开 Databases -> 目标数据库 -> Schemas ->
public(或其他模式,-> Tables。 - 双击目标数据表,主工作区会打开一个以该表命名的标签页,默认显示 Browse 视图。
三、常用功能进阶技巧
- 快速复制数据:在结果网格中,选中单元格、行我用功,直接按
Cmd + C复制,粘贴到表格软件(如 Numbers, Excel)时会自动保持表格结构。 - 外键关联导航:在 Browse 视图中,如果某制是外键,其值会显示为可点击的选中单元格软件(如
- 多结果集比较:执行多条 SELECT 询列本,结果集,方便对比。
- 保存常用查询片段:可以将复条便尃快速复用。
- SSL 与 SSH 隧道连接:在编辑 Favorite 的高结项(Advanced)中,可以配置 SSL 证书或通过 SSH 隧道连接数据库,满足安全访问需求。
Could Not Connect to Server
-
Could Not Connect to Server
PostgreSQL- Network error:
Could not connect to server(Is the server running on host “localhost” (::1 or 127.0.0.1) and accepting TCP/IP connections on port 5432?) - Connection refused:
Could not connect to server(Is the server running on host “localhost” (::1 or 127.0.0.1) and accepting TCP/IP connections on port 5432?) - Configuration error:
pg_hba.confdoes not allow access from your client IP
- Network error:
-
Could Not Connect to Server
PostgreSQL- Network error:
Could not connect to server(Is the server running on host “localhost” (::1 or 127.0.0.1) and accepting TCP/IP connections on port 5432?) - Connection refused:
Could not connect to server(Is the server running on host “localhost” (::1 or 127.0.0.1) and accepting TCP/IP connections on port 5432?) - Configuration error:
pg_hba.confdoes not allow access from your client IP
- Network error:
-
Could Not Connect to Server
PostgreSQL- Explain Analyze:
EXPLAIN ANALYZE(Use this command to analyze the execution plan of a query) - Command:
Cmd + Shift + Return(Use this shortcut to execute a command in the PostgreSQL client)
- Explain Analyze:
Refresh(例如新建。
Cmd + R)手动刷新对象树。Postico for Mac 快捷键汇总表
| Feature | Mac (Mac) | OS |
|---|---|---|
| Favorite 连接 | Cmd + N |
macOS |
| Favorite 询窗口 | Cmd + Option + Q |
macOS |
| Favorite 行全部 SQL | Cmd + Return |
macOS |
| Favorite 行中或结查询编辑器 | Cmd + Shift + Return |
macOS |
| Favorite 刷新对象树/数据 | Cmd + R |
macOS |
| Favorite 切换注释行 | Cmd + / |
macOS |
| Favorite 格式化 SQL | Cmd + Option + F |
macOS |
| Favorite 在表中新增一行 | Cmd + + |
macOS |
| Favorite 删除选中行 | Cmd + Delete |
macOS |
| Favorite 切换标签页 | Cmd + Shift + [ 或 ] |
macOS |
| Favorite 关闭当前标签页 | Cmd + W |
macOS |
| Favorite 聚焦侧边栏搜索框 | Cmd + Option + F |
macOS |
| Favorite 复制行(CSV格式) | Cmd + Shift + C |
macOS |









