Re: Variable substitution in psql backtick expansion

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Fabien COELHO" <coelho(at)cri(dot)ensmp(dot)fr>,"Robert Haas" <robertmhaas(at)gmail(dot)com>,"Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>,"Corey Huinker" <corey(dot)huinker(at)gmail(dot)com>,"PostgreSQL Developers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Variable substitution in psql backtick expansion
Date: 2017-09-04 17:14:31
Message-ID: 22a8687d-c192-4bdc-8d4b-053a094d641b@manitou-mail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

> Since we've blown past 80 columns on some of the other
> output, maybe that doesn't matter. Or maybe we should shorten this
> variable name so it doesn't force reformatting of all this text.

The two-space left margin on the entire block does not add that
much to readability, IMV, so maybe we could reclaim these
two characters.

Another idea: since there are already several variables for which
the text + spacing + presentation don't fit anyway,
we could forget about the tabular presentation and grow
vertically.

That would look like the following, for example, with a 3-space margin
for the description:

AUTOCOMMIT
If set, successful SQL commands are automatically committed
COMP_KEYWORD_CASE
Determines the case used to complete SQL key words
[lower, upper, preserve-lower, preserve-upper]
DBNAME
The currently connected database name
ECHO
Controls what input is written to standard output
[all, errors, none, queries]
ECHO_HIDDEN
If set, display internal queries executed by backslash commands;
if set to "noexec", just show without execution
ENCODING
Current client character set encoding
FETCH_COUNT
The number of result rows to fetch and display at a time
(default: 0=unlimited)
etc..

To me that looks like a good trade-off: it eases the size constraints
for both the description and the name of the variable, at the cost
of consuming one more line per variable, but that's why the pager
is for.

Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2017-09-04 17:17:20 Re: Variable substitution in psql backtick expansion
Previous Message Tom Lane 2017-09-04 17:08:39 Re: Variable substitution in psql backtick expansion