mirror of
https://github.com/dimitri/pgloader.git
synced 2026-02-03 21:41:47 +01:00
Review field to column projection code emitted.
The code emitted by pgloader to transform input fields into PostgreSQL column values was using too many optimization declarations, some of them that SBCL failed to follow through for lack of type marking in the generated code. As SBCL doesn't have enough information to be optimizing anyway, at least we can make it so that we don't have a warning about it. The new code does that. Fixes #803.
This commit is contained in:
parent
6eaad0621b
commit
656bf85075
@ -20,7 +20,6 @@
|
||||
nil
|
||||
col))
|
||||
(lambda (col)
|
||||
(declare (optimize speed))
|
||||
(if (string= null-as col) nil col))))
|
||||
|
||||
(field-name-as-symbol (field-name-or-list)
|
||||
@ -120,7 +119,8 @@
|
||||
(destructuring-bind (&optional ,@args &rest extra) row
|
||||
(declare (ignorable ,@args) (ignore extra))
|
||||
(let ,values
|
||||
(declare (ignorable ,@args))
|
||||
(declare (ignorable ,@args)
|
||||
(type vector ,@args))
|
||||
(vector ,@newrow)))))))))
|
||||
;; allow for some debugging
|
||||
(if compile (compile nil projection) projection))))
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
LOAD CSV
|
||||
FROM inline (a, b, c)
|
||||
INTO postgresql:///pgloader?allcols (a, b, c)
|
||||
INTO postgresql:///pgloader?allcols (a, b, c text using (subseq c 0))
|
||||
|
||||
WITH fields optionally enclosed by '"',
|
||||
fields escaped by double-quote,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user