Skip to content

Commit 7f2ade0

Browse files
committed
Allow conninfo string with osm2pgsql-replication
1 parent def9700 commit 7f2ade0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

scripts/osm2pgsql-replication

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ def pretty_format_timedelta(seconds):
7575
def connect(args):
7676
""" Create a connection from the given command line arguments.
7777
"""
78+
# If dbname looks like a conninfo string use it as such
79+
if any(part in args.database for part in ['=', '://']):
80+
return psycopg.connect(args.database)
81+
7882
return psycopg.connect(dbname=args.database, user=args.username,
7983
host=args.host, port=args.port)
8084

0 commit comments

Comments
 (0)