When merging catalogs, "float" and "double precision" the same type.

PostgreSQL understands both spellings of the data type name and implements
float as being a double precision value, so we should refrain from any
warning about that non-discrepency when doing a data-only load.

Should fix #746.
This commit is contained in:
Dimitri Fontaine 2018-02-16 23:42:46 +01:00
parent 67a1b1d408
commit 5e3acbb462

View File

@ -117,14 +117,18 @@
(column-name source-column) (column-name source-column)
(column-type-name source-column) (column-type-name source-column)
(column-type-name target-column) (column-type-name target-column)
(schema-name (table-schema target-table)) (ensure-unquoted
(table-name target-table) (schema-name (table-schema target-table)))
(column-name target-column)))))) (ensure-unquoted
(table-name target-table))
(ensure-unquoted
(column-name target-column)))))))
(defvar *type-name-mapping* (defvar *type-name-mapping*
'(("int" "integer") '(("int" "integer")
("serial" "integer") ("serial" "integer")
("bigserial" "bigint") ("bigserial" "bigint")
("float" "double precision")
("char" "character") ("char" "character")
("varchar" "character varying") ("varchar" "character varying")
("timestamp" "timestamp without time zone") ("timestamp" "timestamp without time zone")