mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 18:36:12 +02:00
Also handle extra columns in CSV parsing.
This commit is contained in:
parent
516ef08c37
commit
3f61c66a79
@ -263,8 +263,8 @@
|
||||
,(field-name-as-symbol name))))))
|
||||
`(lambda (row)
|
||||
(declare (optimize speed) (type list row))
|
||||
(destructuring-bind (&optional ,@args) row
|
||||
(declare (ignorable ,@args))
|
||||
(destructuring-bind (&optional ,@args &rest extra) row
|
||||
(declare (ignorable ,@args) (ignore extra))
|
||||
(vector ,@newrow))))))))
|
||||
;; allow for some debugging
|
||||
(if compile (compile nil projection) projection))))
|
||||
|
||||
@ -45,5 +45,6 @@ LOAD CSV
|
||||
5|another month 13, stress retry path|2006-13-10|
|
||||
6|some null date to play with||
|
||||
7|and a ragged line|
|
||||
8|and another line|2014-01-22|
|
||||
8|and a line with extra columns|2014-01-23|hello|there|
|
||||
9|and another line|2014-01-22|
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user