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:
Dimitri Fontaine 2014-05-16 00:28:02 +02:00
parent d6c457d89a
commit 39af63b053
2 changed files with 5 additions and 2 deletions

View File

@ -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.