Fix create schema handling in data only scenarios.

In b301aa93948f05b5189382f641cf1e040fc655f2 the "create schema" default
changed to true, which is a good idea. As a consequence pgloader should
consider this operation only when "create tables" is set: we don't want to
start with creating target schemas in a target database that is said to be
ready to host the data.
This commit is contained in:
Dimitri Fontaine 2017-07-06 09:48:03 +02:00
parent dfe5c38185
commit 2363d8845f

View File

@ -30,16 +30,16 @@
(setf (catalog-types-without-btree catalog)
(list-typenames-without-btree-support))
(when create-schemas
(with-stats-collection ("Create Schemas" :section :pre
:use-result-as-read t
:use-result-as-rows t)
(create-schemas catalog
:include-drop include-drop
:client-min-messages :error)))
(if create-tables
(progn
(when create-schemas
(with-stats-collection ("Create Schemas" :section :pre
:use-result-as-read t
:use-result-as-rows t)
(create-schemas catalog
:include-drop include-drop
:client-min-messages :error)))
;; create new SQL types (ENUMs, SETs) if needed and before we
;; get to the table definitions that will use them
(with-stats-collection ("Create SQL Types" :section :pre