Skip to content

Commit 51e0309

Browse files
committed
improve
1 parent fc1b181 commit 51e0309

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

201805/20180516_03.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ copy tbl from 'filepath';
5959

6060
### 客户端COPY接口
6161

62-
1、标准输入、输出
62+
#### 1、标准输入、输出
6363

6464
```
6565
copy tbl to stdout;
@@ -81,15 +81,15 @@ cat file|psql -c "copy tbl from stdin"
8181
psql -c "copy tbl to stdout" > local.csv
8282
```
8383

84-
2、libpq COPY
84+
#### 2、libpq COPY
8585

8686
同时数据库还支持libpq协议的COPY语法,通过libpq协议将数据导入PG,或者从PG导出到客户端。
8787

8888
https://www.postgresql.org/docs/10/static/libpq-copy.html
8989

9090
不需要数据库superuser权限。
9191

92-
3、psql 客户端copy接口
92+
#### 3、psql 客户端copy接口
9393

9494
最后psql客户端,内部封装了copy接口,通过libpq协议的COPY接口与数据库交互。
9595

@@ -155,6 +155,8 @@ Time: 5733.883 ms (00:05.734)
155155

156156
## 参考
157157

158+
[《PostgreSQL copy (quote,DELIMITER,...) single byte char 的输入》](../201805/20180510_01.md)
159+
158160

159161
<a rel="nofollow" href="http://info.flagcounter.com/h9V1" ><img src="http://s03.flagcounter.com/count/h9V1/bg_FFFFFF/txt_000000/border_CCCCCC/columns_2/maxflags_12/viewers_0/labels_0/pageviews_0/flags_0/" alt="Flag Counter" border="0" ></a>
160162

0 commit comments

Comments
 (0)