📜  COPY FROM 指示 PostgreSQL 服务器进程读取文件.您可能需要一个客户端工具,例如 psql 的 \copy. - 打字稿代码示例

📅  最后修改于: 2022-03-11 14:48:26.934000             🧑  作者: Mango

代码示例1
Assuming the psql command-line tool, you may use \copy instead of copy.

\copy opens the file and feeds the contents to the server, whereas copy tells the server the open the file itself and read it, which may be problematic permission-wise, or even impossible if client and server run on different machines with no file sharing in-between.

Under the hood, \copy is implemented as COPY FROM stdin and accepts the same options than the server-side COPY.