Re: Doc patch on psql output formats - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Doc patch on psql output formats
Date
Msg-id 23366.1541516594@sss.pgh.pa.us
Whole thread Raw
In response to Doc patch on psql output formats  ("Daniel Verite" <daniel@manitou-mail.org>)
Responses Re: Doc patch on psql output formats  ("Daniel Verite" <daniel@manitou-mail.org>)
Re: Doc patch on psql output formats  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-hackers
"Daniel Verite" <daniel@manitou-mail.org> writes:
> psql's documentation has this mention about output formats:
>  "Unique abbreviations are allowed. (That would mean one letter is enough.)"

> but "one letter is enough" is not true since 9.3 that added
> "latex-longtable" sharing the same start as "latex", and then 
> 9.5 added "asciidoc" with the same first letter as "aligned".

Yeah, that text has clearly outstayed its welcome.

> When a non-unique abbreviation is used, psql uses the first
> match in an arbitrary order defined in do_pset() by
> a cascade of pg_strncasecmp().

Ugh.  Should we not fix the code so that it complains if there's
not a unique match?  I would bet that the code was also written
on the assumption that any abbrevation must be unique.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: plruby: rb_iterate symbol clash with libruby.so
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #15212: Default values in partition tables don't work asexpected and allow NOT NULL violation