mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-09 15:56:58 +02:00
19 lines
628 B
Fish
19 lines
628 B
Fish
LOAD CSV
|
|
FROM INLINE (f1, f2 null if "", f3)
|
|
INTO postgresql://dim@localhost:54393/dim?nulls (f1, f2, f3)
|
|
WITH truncate,
|
|
fields optionally enclosed by '"',
|
|
fields escaped by double-quote,
|
|
fields terminated by ','
|
|
|
|
BEFORE LOAD DO
|
|
$$ drop table if exists nulls; $$,
|
|
$$ create table if not exists nulls (id serial, f1 text, f2 text, f3 text); $$;
|
|
|
|
"quoted empty string","","should be empty string when the CSV parser is improved"
|
|
"empty string",,"should be null"
|
|
"quoted blanks"," ","should be blanks"
|
|
"blanks", ,"should be null"
|
|
"quoted separator","a,b,c","should be 'a,b,c'"
|
|
|