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 <bruce@momjian.us>) |
Ответы |
Re: psql output change in 9.4
|
Список | pgsql-hackers |
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 <tgl@sss.pgh.pa.us> wrote: >>> Robert Haas <robertmhaas@gmail.com> writes: >>>> On Fri, Aug 8, 2014 at 9:34 PM, Peter Eisentraut <peter_e@gmx.net> 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 по дате отправления: