在尝试使用TARGET COLUMNS
可选参数时,我很难让 pgloader 工作。
LOAD CSV
FROM INLINE
HAVING FIELDS
(
npi,
...
)
INTO postgresql://user:pass!n@pg2/nadb?tablename=tempload
(
npi
)
WITH skip header = 1,
fields optionally enclosed by '"',
fields escaped by double-quote,
fields terminated by ','
SET work_mem to '64MB'
BEFORE LOAD EXECUTE
tempload.sql;
如果我不使用目标列,那么它工作得很好。 tempload
具有与 完全相同的列data.csv
。
每次我运行它时它都会挂起:
2016-06-09T17:17:33.749000-05:00 DEBUG
select i.relname,
n.nspname,
indrelid::regclass,
indrelid,
indisprimary,
indisunique,
pg_get_indexdef(indexrelid),
c.conname,
pg_get_constraintdef(c.oid)
from pg_index x
join pg_class i ON i.oid = x.indexrelid
join pg_namespace n ON n.oid = i.relnamespace
left join pg_constraint c ON c.conindid = i.oid
where indrelid = 'tempload'::regclass
我完全不知所措。就像我说的,如果我不使用它就可以正常工作TARGET COLUMNS
,所以我真的不相信这是数据。
我对 release3.2
和 docker 映像也有同样的看法。