mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 10:31:02 +02:00
Apply quoting rules to SQLite index column names.
The previous fix was wrong for missing the point: rather than unquote column names in the table definition when matching the column names in the index definition, we should in the first place have quoted the index column names when needed. Fixes #872 for real this time.
This commit is contained in:
parent
a939d20dff
commit
af2995b918
@ -266,9 +266,7 @@
|
||||
:collect (column-type-name
|
||||
(find idx-col tbl-cols
|
||||
:test #'string-equal
|
||||
:key (lambda (col)
|
||||
(ensure-unquoted
|
||||
(column-name col)))))))
|
||||
:key #'column-name))))
|
||||
(nobtree (catalog-types-without-btree
|
||||
(schema-catalog (table-schema (index-table index))))))
|
||||
(let* ((idx-type (first idx-types))
|
||||
|
||||
@ -150,7 +150,7 @@
|
||||
"Return the list of columns in INDEX-NAME."
|
||||
(let ((sql (format nil (sql "/sqlite/list-index-cols.sql") index-name)))
|
||||
(loop :for (index-pos table-pos col-name) :in (sqlite:execute-to-list db sql)
|
||||
:collect col-name)))
|
||||
:collect (apply-identifier-case col-name))))
|
||||
|
||||
(defun list-indexes (table &optional (db *sqlite-db*))
|
||||
"Return the list of indexes attached to TABLE."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user