Allow quote/downcase identifiers option for MS SQL.

As seen in #287 the previous decision to force quoting to :none is
wrong, because index names in MS SQL source database might contain
spaces, and then need to be quoted.

Let's see what happens if we do it the usual way for MS SQL too, and
allow users to control the quoting behaviour of pgloader here.
This commit is contained in:
Dimitri Fontaine 2015-09-03 23:34:25 +02:00
parent b78bb6dd31
commit 92d27f4f98
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,8 @@
option-create-schemas option-create-schemas
option-create-indexes option-create-indexes
option-reset-sequences option-reset-sequences
option-encoding)) option-encoding
option-identifiers-case))
(defrule another-mssql-option (and comma mssql-option) (defrule another-mssql-option (and comma mssql-option)
(:lambda (source) (:lambda (source)

View File

@ -296,8 +296,7 @@
;; index build might get unsync: indexes for different tables ;; index build might get unsync: indexes for different tables
;; will get built in parallel --- not a big problem. ;; will get built in parallel --- not a big problem.
(when (and create-indexes (not data-only)) (when (and create-indexes (not data-only))
(let* ((*identifier-case* :none) (let* ((s-entry (assoc schema all-indexes :test 'equal))
(s-entry (assoc schema all-indexes :test 'equal))
(indexes-with-names (indexes-with-names
(cdr (assoc table-name (cdr s-entry) :test 'equal)))) (cdr (assoc table-name (cdr s-entry) :test 'equal))))