mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-07 23:07:00 +02:00
Add support for postgres:// URI prefixes, fix #135.
This commit is contained in:
parent
1b859d269c
commit
1996256f8f
@ -92,7 +92,7 @@
|
|||||||
(declare (ignore qm))
|
(declare (ignore qm))
|
||||||
(list :table-name name)))
|
(list :table-name name)))
|
||||||
|
|
||||||
(defrule pgsql-prefix (and (or "postgresql" "pgsql") "://")
|
(defrule pgsql-prefix (and (or "postgresql" "postgres" "pgsql") "://")
|
||||||
(:constant (list :type :postgresql)))
|
(:constant (list :type :postgresql)))
|
||||||
|
|
||||||
(defrule pgsql-uri (and pgsql-prefix
|
(defrule pgsql-uri (and pgsql-prefix
|
||||||
|
@ -2,7 +2,7 @@ load csv
|
|||||||
from all filenames matching ~<matching.*csv$>
|
from all filenames matching ~<matching.*csv$>
|
||||||
in directory 'data'
|
in directory 'data'
|
||||||
having fields (id, field)
|
having fields (id, field)
|
||||||
into postgresql:///pgloader?matching
|
into postgres:///pgloader?matching
|
||||||
with fields optionally enclosed by '"',
|
with fields optionally enclosed by '"',
|
||||||
fields terminated by ',',
|
fields terminated by ',',
|
||||||
truncate
|
truncate
|
||||||
|
Loading…
Reference in New Issue
Block a user