Blind fix for a strange use-case.

A user reported a case where pgloader fails to find the table an index has
been created on in pgloader catalogs. That's a weird case. For now, just
issue a warning about the situation and skip the index.
This commit is contained in:
Dimitri Fontaine 2018-11-21 18:17:34 +01:00
parent 4ab26e5387
commit 18bcf10903

View File

@ -144,8 +144,14 @@
:columns nil
:filter filter))
(index
(maybe-add-index table index-name pg-index :key #'index-name)))
(add-column index colname))
(when table
(maybe-add-index table index-name pg-index :key #'index-name))))
(unless table
(log-message :warning
"Failed to find table ~s in schema ~s for index ~s, skipping the index"
table-name schema-name index-name))
(when index
(add-column index colname)))
:finally (return catalog)))
(defun list-all-fkeys (catalog &key including excluding)