Add support for MS SQL XML data type.

Given a test case and some reading of the FreeTDS source code, it appears
that the XML data type is sent on the wire as (unicode) text. This patch
makes pgloader aware of that and also revisit the choice of casting XML to
PostgreSQL XML data type (thanks to the test case where we see it just works
without surprise).

Fix #503.
This commit is contained in:
Dimitri Fontaine 2017-03-25 21:26:16 +01:00
parent 296e571e27
commit b2f9590f58
2 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@
(let ((syb-type (foreign-enum-keyword '%syb-value-type type)))
(case syb-type
;; we accept emtpy string (len is 0)
((:syb-char :syb-varchar :syb-text)
((:syb-char :syb-varchar :syb-text :syb-msxml)
(foreign-string-to-lisp data :count len))
(otherwise

View File

@ -10,7 +10,7 @@
(:source (:type "varchar") :target (:type "text" :drop-typemod t))
(:source (:type "nvarchar") :target (:type "text" :drop-typemod t))
(:source (:type "ntext") :target (:type "text" :drop-typemod t))
(:source (:type "xml") :target (:type "text" :drop-typemod t))
(:source (:type "xml") :target (:type "xml" :drop-typemod t))
(:source (:type "int" :auto-increment t)
:target (:type "bigserial" :drop-default t))