mirror of https://github.com/dbcli/pgcli
magic: use pgcli.connect_uri instead of connect (#1375)
This makes %pgcli work even if you use non-password (e.g. TLS cert) authentication
This commit is contained in:
parent
1726ff5397
commit
285e62559e
1
AUTHORS
1
AUTHORS
|
@ -124,6 +124,7 @@ Contributors:
|
|||
* Kian-Meng Ang (kianmeng)
|
||||
* Liu Zhao (astroshot)
|
||||
* Rigo Neri (rigoneri)
|
||||
* Anna Glasgall (annathyst)
|
||||
|
||||
Creator:
|
||||
--------
|
||||
|
|
|
@ -7,6 +7,7 @@ Features:
|
|||
* Changed the `destructive_warning` config to be a list of commands that are considered
|
||||
destructive. This would allow you to be warned on `create`, `grant`, or `insert` queries.
|
||||
* Destructive warnings will now include the alias dsn connection string name if provided (-D option).
|
||||
* pgcli.magic will now work with connection URLs that use TLS client certificates for authentication
|
||||
|
||||
3.5.0 (2022/09/15):
|
||||
===================
|
||||
|
|
|
@ -43,7 +43,7 @@ def pgcli_line_magic(line):
|
|||
u = conn.session.engine.url
|
||||
_logger.debug("New pgcli: %r", str(u))
|
||||
|
||||
pgcli.connect(u.database, u.host, u.username, u.port, u.password)
|
||||
pgcli.connect_uri(str(u._replace(drivername="postgres")))
|
||||
conn._pgcli = pgcli
|
||||
|
||||
# For convenience, print the connection alias
|
||||
|
|
Loading…
Reference in New Issue