mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-08 07:16:58 +02:00
Now that we can have several threads doing COPY, each of them need to know about the *pgsql-reserved-keywords* list. Make sure that's the case and in passing fix some call sites to apply-identifier-case. Also, more disturbingly, fix the code so that TRUNCATE is called from the main thread before giving control to the COPY threads, rather than having two concurrent threads doing the TRUNCATE twice. It's rather strange that we got no complaint from the field on that part...
26 lines
546 B
Fish
26 lines
546 B
Fish
LOAD CSV
|
|
FROM INLINE
|
|
INTO postgresql:///pgloader?"group"
|
|
|
|
WITH truncate,
|
|
fields terminated by ',',
|
|
csv header
|
|
|
|
BEFORE LOAD DO
|
|
$$ drop table if exists "group"; $$,
|
|
$$ CREATE TABLE "group"
|
|
(
|
|
somefields text,
|
|
rekplcode text,
|
|
"repl$grpid" text,
|
|
"repl$id" text,
|
|
another text,
|
|
fields text
|
|
)
|
|
$$;
|
|
|
|
|
|
somefields,reklpcode,repl$grpid,repl$id,another,fields
|
|
a,b,c,d,e,f
|
|
foo,bar,baz,quux,foobar,fizzbuzz
|