mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-07 23:07:00 +02:00
Fix the code to handle lack of target type in MySQL cast rules parsing.
This commit is contained in:
parent
dd38c9c154
commit
020cd7d3ed
@ -491,9 +491,11 @@ Here's a quick description of the format we're parsing here:
|
||||
|
||||
(defun fix-target-type (source target)
|
||||
"When target has :type nil, steal the source :type definition."
|
||||
(unless (getf target :type)
|
||||
(setf (getf target :type) (getf source :type))
|
||||
target))
|
||||
(if (getf target :type)
|
||||
target
|
||||
(loop
|
||||
for (key value) on target by #'cddr
|
||||
append (list key (if (eq :type key) (getf source :type) value)))))
|
||||
|
||||
(defrule cast-rule (and cast-source cast-def (? cast-function))
|
||||
(:lambda (cast)
|
||||
|
Loading…
Reference in New Issue
Block a user