mirror of
https://github.com/dimitri/pgloader.git
synced 2026-02-05 06:21:40 +01:00
Add support for "datetime2" data type in MS SQL.
That's a blind fix, or almost blind: we're given some information but I'm not in a position to test the fix myself. Hope it works. Fixes #1036. Fixes #1018.
This commit is contained in:
parent
df94340396
commit
30376b2cfe
@ -95,7 +95,11 @@
|
||||
(:syb-int8 (mem-ref data :int8))
|
||||
(:syb-real (mem-ref data :float))
|
||||
(:syb-flt8 (mem-ref data :double))
|
||||
((:syb-datetime :syb-datetime4 :syb-msdate :syb-mstime)
|
||||
((:syb-datetime
|
||||
:syb-datetime4
|
||||
:syb-msdate
|
||||
:syb-mstime
|
||||
:syb-msdatetime2)
|
||||
(with-foreign-pointer (%buf +numeric-buf-sz+)
|
||||
(let ((count
|
||||
(%dbconvert %dbproc
|
||||
|
||||
@ -170,6 +170,7 @@
|
||||
(case (intern (string-upcase type) "KEYWORD")
|
||||
(:time (format nil "convert(varchar, [~a], 114)" name))
|
||||
(:datetime (format nil "convert(varchar, [~a], 126)" name))
|
||||
(:datetime2 (format nil "convert(varchar, [~a], 126)" name))
|
||||
(:smalldatetime (format nil "convert(varchar, [~a], 126)" name))
|
||||
(:date (format nil "convert(varchar, [~a], 126)" name))
|
||||
(:bigint (format nil "cast([~a] as numeric)" name))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user