File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ copy tbl from 'filepath';
5959
6060### 客户端COPY接口
6161
62- 1、标准输入、输出
62+ #### 1、标准输入、输出
6363
6464```
6565copy tbl to stdout;
@@ -81,15 +81,15 @@ cat file|psql -c "copy tbl from stdin"
8181psql -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
8888https://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
You can’t perform that action at this time.
0 commit comments