質問編集履歴
3
table_name→dbname
test
CHANGED
File without changes
|
test
CHANGED
@@ -58,7 +58,7 @@
|
|
58
58
|
|
59
59
|
@echo off
|
60
60
|
|
61
|
-
psql.exe -U postgres -d
|
61
|
+
psql.exe -U postgres -d dbname -h localhost -q -t -f C:/test/importCSV.sql
|
62
62
|
|
63
63
|
exit
|
64
64
|
|
2
サーバーなので、\\COPY ではなく COPY に書き換えました
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
SET client_encoding TO 'SJIS';
|
22
22
|
|
23
|
-
|
23
|
+
COPY table_name FROM E'C:\\test\\importdata1.csv' (format csv, header true );
|
24
24
|
|
25
25
|
|
26
26
|
|
1
テーブル名の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -44,7 +44,7 @@
|
|
44
44
|
|
45
45
|
ERROR: invalid byte sequence for encoding "UTF8": 0x8a
|
46
46
|
|
47
|
-
CONTEXT: COPY
|
47
|
+
CONTEXT: COPY table_name, line 1
|
48
48
|
|
49
49
|
|
50
50
|
|