From 5b19776d5b8734d83b596b4b7fd3850c03c7660d Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Thu, 19 Feb 2015 10:15:35 +0100 Subject: [PATCH] MS SQL casting rules for floats: there's no scale. See #177. --- src/sources/mssql/mssql-cast-rules.lisp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/sources/mssql/mssql-cast-rules.lisp b/src/sources/mssql/mssql-cast-rules.lisp index eee923e..b510408 100644 --- a/src/sources/mssql/mssql-cast-rules.lisp +++ b/src/sources/mssql/mssql-cast-rules.lisp @@ -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