mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-05 10:56:10 +02:00
Implement support for SQLite blob to bytea, fixes #59.
This issue has been re-opened with blob instead of double. Semi-blindly implement support for the blob type with an image data type. Disturbingly enough when tested with non-binary data SQLite was returning strings rather than byte vectors, tripping up the transform function that sure expects byte vectors.
This commit is contained in:
parent
d6c457d89a
commit
39af63b053
@ -20,8 +20,8 @@
|
||||
(string-equal sqlite-type-name "nvarchar" :end1 8)) "text")
|
||||
|
||||
((string-equal sqlite-type-name "datetime") "timestamptz")
|
||||
|
||||
((string-equal sqlite-type-name "double") "double precision")
|
||||
((string-equal sqlite-type-name "double") "double precision")
|
||||
((string-equal sqlite-type-name "blob") "bytea")
|
||||
|
||||
(t sqlite-type-name)))
|
||||
|
||||
@ -138,6 +138,9 @@
|
||||
((string-equal "text" coltype)
|
||||
nil)
|
||||
|
||||
((string-equal "bytea" coltype)
|
||||
#'pgloader.transforms::byte-vector-to-bytea)
|
||||
|
||||
(t
|
||||
(compile nil (lambda (c)
|
||||
(when c
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user