Re: psql output change in 9.4
От
Peter Eisentraut
Тема
Re: psql output change in 9.4
Дата
Msg-id
543A00DB.7060100@gmx.net
Ответ на
Re: psql output change in 9.4 (Bruce Momjian)
Список
Дерево обсуждения
psql output change in 9.4 Peter Eisentraut <peter_e@gmx.net>
Re: psql output change in 9.4 Robert Haas <robertmhaas@gmail.com>
Re: psql output change in 9.4 Tom Lane <tgl@sss.pgh.pa.us>
Re: psql output change in 9.4 Robert Haas <robertmhaas@gmail.com>
Re: psql output change in 9.4 Bruce Momjian <bruce@momjian.us>
Re: psql output change in 9.4 Peter Eisentraut <peter_e@gmx.net>
Re: psql output change in 9.4 Bruce Momjian <bruce@momjian.us>
Re: psql output change in 9.4 Tom Lane <tgl@sss.pgh.pa.us>
Re: psql output change in 9.4 Pavel Stehule <pavel.stehule@gmail.com>
On 10/11/14 8:25 PM, Bruce Momjian wrote:
> On Mon, Aug 11, 2014 at 02:28:45PM -0400, Robert Haas wrote:
>> On Mon, Aug 11, 2014 at 1:52 PM, Tom Lane wrote:
>>> Robert Haas writes:
>>>> On Fri, Aug 8, 2014 at 9:34 PM, Peter Eisentraut wrote:
>>>>> What is the point of that change?
>>>
>>>> I think the output could justly be criticized for making it
>>>> insufficiently clear that the parenthesized text is, in fact, the name
>>>> of the pset parameter.
>>>
>>> Quite; that wasn't apparent to me either.
>>>
>>>> We could write something like:
>>>> Border style (parameter "border") is 1.
>>>
>>> How about
>>>
>>> Border style (\pset border) is 1.
>>
>> That would look just fine as a response to \a or \x, but I'm not sure
>> it would look as good as a response to \pset, which prints out that
>> line for every parameter ("why does every line say \pset when the
>> command I just typed is \pset?"). However, I can certainly live with
>> it if others prefer that to what I suggested.
>
> I went with quoting the pset variable:
>
> test=> \a
> Output format ("format") is aligned.
> test=> \x
> Expanded display ("expanded") is on.
>
> Patch attached. I think this would be for 9.5 only, at this point.
Funny, I was *just* working on that, too. I propose a patch that
reverts the output to how it was in 9.3 (without anything in
parentheses), and implements the output of \pset without any arguments
separately, thus:
# \a
Output format is unaligned.
# \pset
border 2
columns 0
expanded auto
fieldsep '|'
fieldsep_zero off
footer on
format unaligned
linestyle unicode
null ''
numericlocale off
pager 1
recordsep '\n'
recordsep_zero off
tableattr
title
tuples_only off
(This is also symmetric with what \set outputs.)
On closer examination, the change in 9.4, besides having the aesthetic
issues discussed earlier, also created some outright incorrect output by
mixing together fieldsep/fieldsep_zero and recordsep/recordsep_zero.
These issues become much clearer if you separate the case of "this is
what you just set" from "these are all the current settings".
В списке pgsql-hackers по дате отправления
От: Fabrízio de Royes Mello
Дата: