mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-08 07:16:58 +02:00
We forgot that rule in the case of creating the target tables for the materializing views commands, which led to surprising and wrong behavior. Fix #721, and add a new test case while at it.
22 lines
540 B
Fish
22 lines
540 B
Fish
load database
|
|
from mysql://root@localhost/f1db
|
|
into pgsql:///plop
|
|
|
|
-- with data only, truncate
|
|
|
|
WITH disable triggers, data only, no truncate,
|
|
include no drop, create no tables, create indexes,
|
|
reset sequences, no foreign keys,
|
|
downcase identifiers, uniquify index names
|
|
|
|
excluding table names matching ~/./
|
|
|
|
materialize views circuit as
|
|
$$
|
|
select circuitid, circuitref, name, location, country,
|
|
concat('(', lng, ',', lat, ')') as position,
|
|
alt, url
|
|
from circuits;
|
|
$$;
|
|
|