mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 10:31:02 +02:00
Use the "table name" option when loading from DBF, fix #175.
The command parser for DBF sources wasn't (anymore?) considering the value of the "table name = " option, only considering the option from the connection string. Make it so that the option now takes preference over the DSN tablename option when both are set.
This commit is contained in:
parent
a8e728a740
commit
8f4eb73cad
@ -84,7 +84,8 @@
|
||||
,@(pgsql-connection-bindings pg-db-conn gucs)
|
||||
,@(batch-control-bindings options)
|
||||
,@(identifier-case-binding options)
|
||||
(table-name ,(pgconn-table-name pg-db-conn))
|
||||
(table-name ,(or (getf options :table-name)
|
||||
(pgconn-table-name pg-db-conn)))
|
||||
(source-db (with-stats-collection ("fetch" :state state-before)
|
||||
(expand (fetch-file ,dbf-db-conn))))
|
||||
(source
|
||||
|
||||
@ -17,7 +17,8 @@
|
||||
(with-connection (conn (source-db db3))
|
||||
(unless (and (slot-boundp db3 'columns) (slot-value db3 'columns))
|
||||
(setf (slot-value db3 'columns)
|
||||
(list-all-columns (fd-db3 conn) (source db3))))
|
||||
(list-all-columns (fd-db3 conn)
|
||||
(or (target db3) (source db3)))))
|
||||
|
||||
(let ((transforms (when (slot-boundp db3 'transforms)
|
||||
(slot-value db3 'transforms))))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user