mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 10:31:02 +02:00
Have db3-numeric-to-pgsql-integer accept integer values.
The cl-db3 driver is now parsing type I fields and emit them as native integers. We need to deal with that. See #929.
This commit is contained in:
parent
954eca02d0
commit
a51819f874
@ -512,10 +512,12 @@
|
||||
|
||||
(defun db3-numeric-to-pgsql-integer (value)
|
||||
"DB3 numerics should be good to go, but might contain spaces."
|
||||
(when value
|
||||
(let ((integer-or-nil (parse-integer value :junk-allowed t)))
|
||||
(when integer-or-nil
|
||||
(write-to-string integer-or-nil)))))
|
||||
(etypecase value
|
||||
(null nil)
|
||||
(integer (write-to-string value))
|
||||
(string (let ((integer-or-nil (parse-integer value :junk-allowed t)))
|
||||
(when integer-or-nil
|
||||
(write-to-string integer-or-nil))))))
|
||||
|
||||
(defun db3-date-to-pgsql-date (value)
|
||||
"Convert a DB3 date to a PostgreSQL date."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user