mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 18:36:12 +02:00
MS SQL casting rules for floats: there's no scale. See #177.
This commit is contained in:
parent
7fd1ddaa5f
commit
5b19776d5b
@ -86,16 +86,9 @@
|
||||
|
||||
((member type '("float" "real") :test #'string=)
|
||||
;; see https://msdn.microsoft.com/en-us/library/ms173773.aspx
|
||||
(if (mssql-column-numeric-scale col)
|
||||
(if (<= (mssql-column-numeric-scale col) 24)
|
||||
"float"
|
||||
"double precision")
|
||||
|
||||
;; no scale
|
||||
(format nil "~a(~a,~a)"
|
||||
type
|
||||
(mssql-column-numeric-precision col)
|
||||
(mssql-column-numeric-scale col))))
|
||||
;; scale is supposed to be nil, and useless in PostgreSQL, so we
|
||||
;; just ignore it
|
||||
(format nil "~a(~a)" type (mssql-column-numeric-precision col)))
|
||||
|
||||
((member type '("decimal" "numeric" ) :test #'string=)
|
||||
;; https://msdn.microsoft.com/en-us/library/ms187746.aspx
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user