From fa11d0da51045077b543d42a1ab661c4a20b5127 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 1 Nov 2023 05:38:03 +0100 Subject: Adding upstream version 4.0.1. Signed-off-by: Daniel Baumann --- pgcli/pgclirc | 48 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 11 deletions(-) (limited to 'pgcli/pgclirc') diff --git a/pgcli/pgclirc b/pgcli/pgclirc index dcff63d..51f7eae 100644 --- a/pgcli/pgclirc +++ b/pgcli/pgclirc @@ -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 @@ -22,14 +26,22 @@ multi_line = False # a command. multi_line_mode = psql -# Destructive warning mode will alert you before executing a sql statement +# Destructive warning will alert you before executing a sql statement # that may cause harm to the database such as "drop table", "drop database", # "shutdown", "delete", or "update". -# Possible values: -# "all" - warn on data definition statements, server actions such as SHUTDOWN, DELETE or UPDATE -# "moderate" - skip warning on UPDATE statements, except for unconditional updates -# "off" - skip all warnings -destructive_warning = all +# You can pass a list of destructive commands or leave it empty if you want to skip all warnings. +# "unconditional_update" will warn you of update statements that don't have a where clause +destructive_warning = drop, shutdown, delete, truncate, alter, update, unconditional_update + +# Destructive warning can restart the connection if this is enabled and the +# user declines. This means that any current uncommitted transaction can be +# aborted if the user doesn't want to proceed with a destructive_warning +# statement. +destructive_warning_restarts_connection = False + +# When this option is on (and if `destructive_warning` is not empty), +# destructive statements are not executed when outside of a transaction. +destructive_statements_require_transaction = False # Enables expand mode, which is similar to `\x` in psql. expand = False @@ -37,9 +49,21 @@ expand = False # Enables auto expand mode, which is similar to `\x auto` in psql. auto_expand = False +# Auto-retry queries on connection failures and other operational errors. If +# False, will prompt to rerun the failed query instead of auto-retrying. +auto_retry_closed_connection = True + # If set to True, table suggestions will include a table alias generate_aliases = False +# Path to a json file that specifies specific table aliases to use when generate_aliases is set to True +# the format for this file should be: +# { +# "some_table_name": "desired_alias", +# "some_other_table_name": "another_alias" +# } +alias_map_file = + # log_file location. # In Unix/Linux: ~/.config/pgcli/log # In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\log @@ -83,9 +107,10 @@ qualify_columns = if_more_than_one_table # When no schema is entered, only suggest objects in search_path search_path_filter = False -# Default pager. -# By default 'PAGER' environment variable is used -# pager = less -SRXF +# Default pager. See https://www.pgcli.com/pager for more information on settings. +# By default 'PAGER' environment variable is used. If the pager is less, and the 'LESS' +# environment variable is not set, then LESS='-SRXF' will be automatically set. +# pager = less # Timing of sql statements and table rendering. timing = True @@ -140,7 +165,7 @@ less_chatty = False # \i - Postgres PID # \# - "@" sign if logged in as superuser, '>' in other case # \n - Newline -# \dsn_alias - name of dsn alias if -D option is used (empty otherwise) +# \dsn_alias - name of dsn connection string alias if -D option is used (empty otherwise) # \x1b[...m - insert ANSI escape sequence # eg: prompt = '\x1b[35m\u@\x1b[32m\h:\x1b[36m\d>' prompt = '\u@\h:\d> ' @@ -198,7 +223,8 @@ output.null = "#808080" # Named queries are queries you can execute by name. [named queries] -# DSN to call by -D option +# Here's where you can provide a list of connection string aliases. +# You can use it by passing the -D option. `pgcli -D example_dsn` [alias_dsn] # example_dsn = postgresql://[user[:password]@][netloc][:port][/dbname] -- cgit v1.2.3