From 92d27f4f98c864caf2f40a70f660f29d9c1f20cc Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Thu, 3 Sep 2015 23:34:25 +0200 Subject: [PATCH] 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. --- src/parsers/command-mssql.lisp | 3 ++- src/sources/mssql/mssql.lisp | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parsers/command-mssql.lisp b/src/parsers/command-mssql.lisp index 9b29732..74bc696 100644 --- a/src/parsers/command-mssql.lisp +++ b/src/parsers/command-mssql.lisp @@ -26,7 +26,8 @@ option-create-schemas option-create-indexes option-reset-sequences - option-encoding)) + option-encoding + option-identifiers-case)) (defrule another-mssql-option (and comma mssql-option) (:lambda (source) diff --git a/src/sources/mssql/mssql.lisp b/src/sources/mssql/mssql.lisp index 6cc1ade..9daee61 100644 --- a/src/sources/mssql/mssql.lisp +++ b/src/sources/mssql/mssql.lisp @@ -296,8 +296,7 @@ ;; index build might get unsync: indexes for different tables ;; will get built in parallel --- not a big problem. (when (and create-indexes (not data-only)) - (let* ((*identifier-case* :none) - (s-entry (assoc schema all-indexes :test 'equal)) + (let* ((s-entry (assoc schema all-indexes :test 'equal)) (indexes-with-names (cdr (assoc table-name (cdr s-entry) :test 'equal))))