mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-06 22:37:02 +02:00
15 lines
431 B
Fish
15 lines
431 B
Fish
LOAD CSV
|
|
FROM INLINE
|
|
INTO postgresql:///pgloader?lines (f1, f2, f3)
|
|
WITH truncate,
|
|
fields optionally enclosed by '"',
|
|
fields escaped by double-quote,
|
|
fields terminated by '¦',
|
|
lines terminated by '¶'
|
|
|
|
BEFORE LOAD DO
|
|
$$ drop table if exists lines; $$,
|
|
$$ create table if not exists lines (id serial, f1 text, f2 text, f3 text); $$;
|
|
|
|
plop¦bar¦foo¶plip¦second line¦bar¶
|