mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-05 02:46:10 +02:00
Fix numeric casting support for MS SQL.
It's possible to get a numeric column with nil precision and scale, and the code wasn't ready for this situation. Bug found while seeing about
This commit is contained in:
parent
5e7e5391ef
commit
3e3ebf2333
@ -92,10 +92,13 @@
|
||||
|
||||
((member type '("decimal" "numeric" ) :test #'string=)
|
||||
;; https://msdn.microsoft.com/en-us/library/ms187746.aspx
|
||||
(format nil "~a(~a,~a)"
|
||||
type
|
||||
(mssql-column-numeric-precision col)
|
||||
(mssql-column-numeric-scale col)))
|
||||
(cond ((null (mssql-column-numeric-precision col))
|
||||
type)
|
||||
(t
|
||||
(format nil "~a(~a,~a)"
|
||||
type
|
||||
(mssql-column-numeric-precision col)
|
||||
(or (mssql-column-numeric-scale col) 0)))))
|
||||
|
||||
(t type))))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user