1
0
Fork 0

Add config option to always run with a single connection (#1386)

Co-authored-by: Irina Truong <i.chernyavska@gmail.com>
This commit is contained in:
Andy Schoenberger 2023-01-03 16:52:31 -05:00 committed by GitHub
parent 81b0431d80
commit 141873f86d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View File

@ -12,6 +12,7 @@ Features:
Also prevents getting stuck in a retry loop.
* Config option to not restart connection when cancelling a `destructive_warning` query. By default,
it will now not restart.
* Config option to always run with a single connection.
Bug fixes:
----------

View File

@ -264,6 +264,9 @@ class PGCli:
# Initialize completer
smart_completion = c["main"].as_bool("smart_completion")
keyword_casing = c["main"]["keyword_casing"]
single_connection = single_connection or c["main"].as_bool(
"always_use_single_connection"
)
self.settings = {
"casing_file": get_casing_file(c),
"generate_casing_file": c["main"].as_bool("generate_casing_file"),

View File

@ -9,6 +9,10 @@ smart_completion = True
# visible.)
wider_completion_menu = False
# Do not create new connections for refreshing completions; Equivalent to
# always running with the --single-connection flag.
always_use_single_connection = False
# Multi-line mode allows breaking up the sql statements into multiple lines. If
# this is set to True, then the end of the statements must have a semi-colon.
# If this is set to False then sql statements can't be split into multiple