Compare type names case-insensitively in casting rules.

The types TEXT and text are the same, and should match both when used as a
casting rule and when checking a catalog merge.

See #132.
This commit is contained in:
Dimitri Fontaine 2019-02-05 18:26:40 +03:00
parent 36fbadded6
commit 213edbe930
2 changed files with 4 additions and 4 deletions

View File

@ -148,7 +148,7 @@
similar enough that we may continue with the migration."
(let ((source-type-name (get-type-name source-column))
(target-type-name (column-type-name target-column)))
(or (string= source-type-name target-type-name)
(or (string-equal source-type-name target-type-name)
(member target-type-name (cdr (assoc source-type-name *type-name-mapping*
:test #'string=))
:test #'string=))))
:test #'string-equal))))

View File

@ -57,10 +57,10 @@
;; otherwide, we do the full dance
(and
(or (and t-s-p (string= type rule-source-type)))
(or (and t-s-p (string-equal type rule-source-type)))
(or (null tm-s-p) (when typemod
(typemod-expr-matches-p typemod-expr typemod)))
(or (null d-s-p) (string= default rule-source-default))
(or (null d-s-p) (string-equal default rule-source-default))
(or (null u-s-p) (eq unsigned rule-unsigned))
(or (null n-s-p) (eq not-null rule-source-not-null))