mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 10:31:02 +02:00
Add support for SQLite "double" data type, Fix #59.
This time with a test case rather than trying to blindly address the problem in a very small amount of time.
This commit is contained in:
parent
efda3eebfa
commit
d6c457d89a
@ -21,6 +21,8 @@
|
||||
|
||||
((string-equal sqlite-type-name "datetime") "timestamptz")
|
||||
|
||||
((string-equal sqlite-type-name "double") "double precision")
|
||||
|
||||
(t sqlite-type-name)))
|
||||
|
||||
(defmethod format-pgsql-column ((col coldef) &key identifier-case)
|
||||
@ -128,6 +130,7 @@
|
||||
;; objects, where we only want to deal with text.
|
||||
;;
|
||||
(cond ((or (string-equal "float" coltype)
|
||||
(string-equal "double precision" coltype)
|
||||
(and (<= 7 (length coltype))
|
||||
(string-equal "numeric" coltype :end2 7)))
|
||||
#'pgloader.transforms::float-to-string)
|
||||
@ -135,9 +138,6 @@
|
||||
((string-equal "text" coltype)
|
||||
nil)
|
||||
|
||||
((string-equal "double" coltype)
|
||||
"double precision")
|
||||
|
||||
(t
|
||||
(compile nil (lambda (c)
|
||||
(when c
|
||||
|
||||
7
test/sqlite-chinook.load
Normal file
7
test/sqlite-chinook.load
Normal file
@ -0,0 +1,7 @@
|
||||
load database
|
||||
from 'sqlite/Chinook_Sqlite_AutoIncrementPKs.sqlite'
|
||||
into postgresql:///pgloader
|
||||
|
||||
with include drop, create tables, create indexes, reset sequences
|
||||
|
||||
set work_mem to '16MB', maintenance_work_mem to '512 MB';
|
||||
@ -1,5 +1,5 @@
|
||||
load database
|
||||
from 'sqlite/Chinook_Sqlite_AutoIncrementPKs.sqlite'
|
||||
from 'sqlite/sqlite.db'
|
||||
into postgresql:///pgloader
|
||||
|
||||
with include drop, create tables, create indexes, reset sequences
|
||||
|
||||
BIN
test/sqlite/sqlite.db
Normal file
BIN
test/sqlite/sqlite.db
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user