mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-05 02:46:10 +02:00
Fix unknown source type error, fix #237.
In passing also recognize the ".sqlite3" file type as being a SQLite database file.
This commit is contained in:
parent
dc86b5e600
commit
62931e0312
@ -300,7 +300,8 @@
|
||||
(source (if type
|
||||
(parse-source-string-for-type type source)
|
||||
(parse-source-string source)))
|
||||
(type (parse-cli-type (conn-type source)))
|
||||
(type (when source
|
||||
(parse-cli-type (conn-type source))))
|
||||
(target (parse-target-string (second arguments))))
|
||||
|
||||
;; some verbosity about the parsing "magic"
|
||||
|
||||
@ -139,7 +139,7 @@
|
||||
(defvar *data-source-filename-extensions*
|
||||
'((:csv . ("csv" "tsv" "txt" "text"))
|
||||
(:copy . ("copy" "dat")) ; reject data files are .dat
|
||||
(:sqlite . ("sqlite" "db"))
|
||||
(:sqlite . ("sqlite" "db" "sqlite3"))
|
||||
(:dbf . ("db3" "dbf"))
|
||||
(:ixf . ("ixf"))))
|
||||
|
||||
@ -215,13 +215,14 @@
|
||||
:collect (parse 'generic-option guc)))
|
||||
|
||||
(defrule dbf-type-name (or "dbf" "db3") (:constant "dbf"))
|
||||
(defrule sqlite-type-name (or "sqlite3" "sqlite") (:constant "sqlite"))
|
||||
|
||||
(defrule cli-type (or "csv"
|
||||
"fixed"
|
||||
"copy"
|
||||
dbf-type-name
|
||||
sqlite-type-name
|
||||
"ixf"
|
||||
"sqlite"
|
||||
"mysql"
|
||||
"mssql")
|
||||
(:text t))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user