Re: Doc patch on psql output formats

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Daniel Verite" <daniel@manitou-mail.org>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2018-11-26T14:39:50Z
Lists: pgsql-hackers
"Daniel Verite" <daniel@manitou-mail.org> writes:
> 	Tom Lane wrote:
>> As of HEAD, it's impossible to select latex output format
>> at all:
>> regression=# \pset format latex
>> \pset: ambiguous abbreviation "latex" matches both "latex" and
>> "latex-longtable"

> Oops!

>> We could fix that by adding a special case to accept an exact match
>> immediately.

> Personally I would favor that one, but to me the problem is that
> allowing abbreviations doesn't really work well in the long run,
> that is, if new format names are going to appear recurringly in the
> future.

Perhaps, but that ship sailed years ago.  I do not think we can or
should remove the ability to write abbreviations here.  People
writing scripts are obviously taking a risk of future breakage
if they abbreviate, but how is it an improvement in their lives
if we change the risk from "uncertain" to "100%"?

			regards, tom lane


Commits

  1. Fix breakage of "\pset format latex".

  2. Make psql's "\pset format" command reject non-unique abbreviations.

  3. Doc: remove claim that all \pset format options are unique in 1 letter.

  4. Reorganize format options of psql in alphabetical order