mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-07 14:56:59 +02:00
Now it's possible to parse a command to load data from MS SQL. The parser was until now parsing all database URI within the same common rule and that isn't possible anymore if we want to distinguish in between source database right from the parser, which we actually want to do. This patch also implement in-passing fixes all over the place, including the transformation function float-to-string that only happened to work on double-float data.
17 lines
629 B
Fish
17 lines
629 B
Fish
load database
|
|
from mssql://dim:pass@localhost/AdventureWorks2008R2
|
|
into postgresql:///advworks
|
|
|
|
-- WITH include drop, create tables, no truncate,
|
|
-- create indexes, reset sequences, foreign keys
|
|
|
|
SET maintenance_work_mem to '128MB', work_mem to '12MB'
|
|
|
|
BEFORE LOAD DO
|
|
$$ drop schema if exists humanresources cascade; $$,
|
|
$$ drop schema if exists person cascade; $$,
|
|
$$ drop schema if exists production cascade; $$,
|
|
$$ drop schema if exists public cascade; $$,
|
|
$$ drop schema if exists purchasing cascade; $$,
|
|
$$ drop schema if exists sales cascade; $$;
|