mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-05 02:46:10 +02:00
Fix MS SQL N'' default values.
MS SQL apparently sends default values as Nvarchar, and in this case it means we have to deal ourselves with the N'' representation of it.
This commit is contained in:
parent
57bc1ca886
commit
2f7169e286
@ -128,6 +128,11 @@
|
||||
(cond ((and (null default) (column-nullable pgcol)) :null)
|
||||
((and (stringp default) (string= "NULL" default)) :null)
|
||||
|
||||
;; fix stupid N'' behavior from MS SQL column default
|
||||
((and (stringp default)
|
||||
(uiop:string-enclosed-p "N'" default "'"))
|
||||
(subseq default 2 (+ (length default) -1)))
|
||||
|
||||
((and (stringp default)
|
||||
;; address CURRENT_TIMESTAMP(6) and other spellings
|
||||
(or (uiop:string-prefix-p "CURRENT_TIMESTAMP" default)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user