summaryrefslogtreecommitdiffstats
path: root/pgcli/completion_refresher.py
diff options
context:
space:
mode:
Diffstat (limited to 'pgcli/completion_refresher.py')
-rw-r--r--pgcli/completion_refresher.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pgcli/completion_refresher.py b/pgcli/completion_refresher.py
index a70d2f2b..cf0879fd 100644
--- a/pgcli/completion_refresher.py
+++ b/pgcli/completion_refresher.py
@@ -84,6 +84,10 @@ class CompletionRefresher(object):
for callback in callbacks:
callback(completer)
+ if not settings.get("single_connection") and executor.conn:
+ # close connection established with pgexecute.copy()
+ executor.conn.close()
+
def refresher(name, refreshers=CompletionRefresher.refreshers):
"""Decorator to populate the dictionary of refreshers with the current