Unquote names when searching for an index column name in its table.

If the source database is using a keyword (such as "order") as a column
name, then pgloader is going to quote this column name in its internal
catalogs. In that case, unquote the column in the pgloader catalogs when
matching it against the unquoted column name we have in the index
definition.

Fixes #872.
This commit is contained in:
Dimitri Fontaine 2018-12-01 21:27:26 +01:00
parent ab2cadff24
commit a939d20dff

View File

@ -266,7 +266,9 @@
:collect (column-type-name
(find idx-col tbl-cols
:test #'string-equal
:key #'column-name))))
:key (lambda (col)
(ensure-unquoted
(column-name col)))))))
(nobtree (catalog-types-without-btree
(schema-catalog (table-schema (index-table index))))))
(let* ((idx-type (first idx-types))