Skip to content

Commit 0d288f7

Browse files
committed
更新README.md
1 parent 04e18bb commit 0d288f7

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ psql (PostgreSQL) 9.3.9
658658

659659
终端远程连接 postgres 命令
660660
```
661-
$ psql -h [ip] -p[port] -U [user] -d [database]
661+
$ psql -h [ip] -p [port] -U [user] -d [database]
662662
```
663663

664664
打开扩展,格式化显示查询结果,使用 \x 切换显示效果
@@ -671,6 +671,18 @@ Expanded display is off.
671671
wl_crawl=# select * from [table] limit 10;
672672
```
673673

674+
建立索引
675+
```
676+
create index idx_tab_col on tab(col);
677+
tab: 表名
678+
col: 字段名
679+
```
680+
681+
删除索引
682+
```
683+
drop index idx_tab_col
684+
```
685+
674686
psql 是一个普通的 PostgreSQL 客户端应用。
675687

676688
为了与一个数据库联接,你需要知道你的目标数据库, 服务器的主机名和端口号以及你希望以哪个用户的身份进行联接等信息。

0 commit comments

Comments
 (0)