Error early when failing to match IXF type.

Our IXF type matching appears to be incomplete, and pgloader would then
happily try to create a table column of type NIL in PostgreSQL: prevent
that from happening by raising an error condition early. Fix #289.
This commit is contained in:
Dimitri Fontaine 2015-09-04 12:17:57 +02:00
parent 792db2fcf4
commit e76a4c8f5a

View File

@ -41,7 +41,11 @@
(defun cast-ixf-type (ixf-type)
"Return the PostgreSQL type name for a given IXF type name."
(cdr (assoc ixf-type *ixf-pgsql-type-mapping*)))
(let ((pgtype
(cdr (assoc ixf-type *ixf-pgsql-type-mapping*))))
(unless pgtype
(error "IXF Type mapping unknown for: ~x" ixf-type))
pgtype))
(defmethod format-pgsql-column ((col ixf:ixf-column))
"Return a string reprensenting the PostgreSQL column definition"