mirror of
https://github.com/dimitri/pgloader.git
synced 2026-01-22 15:41:03 +01:00
It turns out recent changes broke tne SQLite index support (from adding support for MS SQL partial/filtered indexes), so fix it by using the pgsql-index structure rather than the specific sqlite-idx one. In passing, improve detection of PRIMARY KEY indexes, which was still lacking. This work showed that the introspection done by pgloader was wrong, it's way more crazy that we though, so adjust the code to loop over PRAGMA calls for each object we inspect. While adding PRAGMA calls, add support for foreign keys too, we have the code infrastructure that makes it easy now.
11 lines
337 B
Fish
11 lines
337 B
Fish
load database
|
|
from 'sqlite/Chinook_Sqlite_AutoIncrementPKs.sqlite'
|
|
into postgresql:///pgloader
|
|
|
|
-- including only table names like 'Invoice%'
|
|
|
|
with workers = 4,
|
|
concurrency = 2,
|
|
include drop, create tables, create indexes, reset sequences, foreign keys
|
|
|
|
set work_mem to '16MB', maintenance_work_mem to '512 MB'; |