mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-08 07:16:58 +02:00
When the list of columns of the PostgreSQL target table isn't given in the load command, pgloader will happily query the system catalogs to get that information. The list-columns query didn't get the memo about the qualified table name format and the with-schema macro... fix #288.
26 lines
550 B
Fish
26 lines
550 B
Fish
LOAD CSV
|
|
FROM INLINE
|
|
INTO postgresql:///pgloader?public.header
|
|
|
|
WITH truncate,
|
|
fields terminated by ',',
|
|
csv header
|
|
|
|
BEFORE LOAD DO
|
|
$$ drop table if exists header; $$,
|
|
$$ CREATE TABLE header
|
|
(
|
|
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
|