pgloader/test/csv-guess.load
Dimitri Fontaine d2d4be2ed0 Fix test/csv-guess.load for old PostgreSQL.
In travis environment we still test with PostgreSQL 9.1 and 9.6, and there's
no reason for this test to use a modern spelling of create schema, after
all.

It works because the test/csv-before-after.load creates the schema and is
ran before test/csv-guess.load. That's good enough for now.
2017-09-09 00:59:39 +02:00

22 lines
511 B
Fish

LOAD CSV
FROM data/track.csv
INTO postgresql:///pgloader
TARGET TABLE csv.track
WITH truncate
BEFORE LOAD DO
$$ drop table if exists csv.track; $$,
$$ create table csv.track (
trackid bigserial primary key,
track text,
album text,
media text,
genre text,
composer text,
milliseconds bigint,
bytes bigint,
unitprice numeric
);
$$;