mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-06 22:37:02 +02:00
The COPY format now supports user defined delimiter and null options, and we don't require the column names anymore as it's useless in that context.
18 lines
287 B
Fish
18 lines
287 B
Fish
LOAD COPY
|
|
FROM inline
|
|
INTO postgresql:///pgloader?copyhex
|
|
|
|
WITH truncate,
|
|
delimiter '\t',
|
|
null "--"
|
|
|
|
BEFORE LOAD DO
|
|
$$ drop table if exists copyhex; $$,
|
|
$$ create table copyhex(id int, text varchar(4)); $$;
|
|
|
|
1 a
|
|
2 aa
|
|
3 \x1a
|
|
4 a\x1a
|
|
5 \N
|
|
6 -- |