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:
Dimitri Fontaine 2018-02-25 23:39:52 +01:00
parent 784aff6ed5
commit 42c9ccfbb3

View File

@ -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))