我有 postgres 9.5 版 我想用 Powershell 命令执行 Postgres COPY 命令的 PROGRAM 子句以将 csv 数据导入表
我尝试在 postgres 9.5 中执行以下命令 COPY [表名] FROM PROGRAM 'powershell -command { Get-Content "文件路径"|选择 -skip 1}' WITH DELIMITER ',' CSV HEADER ;
错误:- 详细信息:子进程已退出,退出代码为 255
请帮助我们 谢谢你
最佳答案
只是我需要删除“{”“}”,它工作正常 查询如下 COPY [表名] FROM PROGRAM 'powershell -command Get-Content “文件路径” |选择 -skip 1' WITH DELIMITER ',' CSV HEADER ;
关于java - 如何在 Powershell 命令中使用 Postgres COPY 命令的 PROGRAM 子句,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52734875/