mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 18:36:12 +02:00
DB3: pick user's choice of schema name when given.
We would hard-code the schema name into the table's name in the DB3 case on the grounds that a db3/dbf file doesn't have a notion of a schema. But when the user wants to add data into an existing target table, then we merge the catalogs and must keep the given target schema and table name. Fix #701.
This commit is contained in:
parent
784aff6ed5
commit
42c9ccfbb3
@ -51,7 +51,10 @@
|
||||
(declare (ignore materialize-views only-tables create-indexes foreign-keys
|
||||
including excluding))
|
||||
(let* ((table (or (target db3) (source db3)))
|
||||
(schema (add-schema catalog (table-name table))))
|
||||
(schema (or (when (table-schema (target db3))
|
||||
(push-to-end (table-schema (target db3))
|
||||
(catalog-schema-list catalog)))
|
||||
(add-schema catalog (table-name table)))))
|
||||
(push-to-end table (schema-table-list schema))
|
||||
|
||||
(with-connection (conn (source-db db3))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user