pgloader/test/csv-header.load
Dimitri Fontaine a0dc59624c Fix schema qualified table names usage again.
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.
2015-09-11 11:53:28 +02:00

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