mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-07 06:47:00 +02:00
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.
22 lines
511 B
Fish
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
|
|
);
|
|
$$;
|