From 20d7858e271447d625f9e2c6ae3aec0da651d3da Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Wed, 7 Feb 2018 20:47:47 +0100 Subject: [PATCH] =?UTF-8?q?Implement=20SQLite=20casting=20rule=20for=20?= =?UTF-8?q?=E2=80=9Cdecimal=E2=80=9D.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #739. --- docs/ref/sqlite.rst | 1 + src/sources/sqlite/sqlite-cast-rules.lisp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/ref/sqlite.rst b/docs/ref/sqlite.rst index 2af9fbf..763f4ae 100644 --- a/docs/ref/sqlite.rst +++ b/docs/ref/sqlite.rst @@ -183,6 +183,7 @@ Numbers:: type real to real using float-to-string type double to double precision using float-to-string type numeric to numeric using float-to-string + type decimal to numeric using float-to-string Texts:: diff --git a/src/sources/sqlite/sqlite-cast-rules.lisp b/src/sources/sqlite/sqlite-cast-rules.lisp index beca485..f884597 100644 --- a/src/sources/sqlite/sqlite-cast-rules.lisp +++ b/src/sources/sqlite/sqlite-cast-rules.lisp @@ -35,6 +35,9 @@ (:source (:type "numeric") :target (:type "numeric" :drop-typemod nil) :using pgloader.transforms::float-to-string) + (:source (:type "decimal") :target (:type "decimal" :drop-typemod nil) + :using pgloader.transforms::float-to-string) + (:source (:type "blob") :target (:type "bytea") :using pgloader.transforms::byte-vector-to-bytea)