diff options
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/psycopg2.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/psycopg2.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py index 199c1c776..fb127f1c7 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py @@ -769,8 +769,13 @@ class PGDialect_psycopg2(PGDialect): # send individual dbname, user, password, host, port # parameters to psycopg2.connect() return ([], opts) + elif url.query: + # any other connection arguments, pass directly + opts.update(url.query) + return ([], opts) else: - # send a blank string for "dsn" to psycopg2.connect() + # no connection arguments whatsoever; psycopg2.connect() + # requires that "dsn" be present as a blank string. return ([''], opts) def is_disconnect(self, e, connection, cursor): |