Re: Fwd: Another little thing about psql wrapped expanded output
От | David G. Johnston |
---|---|
Тема | Re: Fwd: Another little thing about psql wrapped expanded output |
Дата | |
Msg-id | CAKFQuwZEOgUsZv+9dh2RezQYqhLRM0ZYHZdefxt-aLBuKy83MA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Fwd: Another little thing about psql wrapped expanded output (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
On Wed, Dec 2, 2015 at 5:24 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Jeff Janes <jeff.janes@gmail.com> writes:
>> On Wed, Dec 2, 2015 at 12:37 PM, Josh Berkus <josh@agliodbs.com> wrote:
>>> If you're fixing the dashed-line code, is there a way to say that we
>>> never have more than a reasonable number of dashes (ideally, the width
>>> of the terminal) no matter how wide the data is? Having 4000 dashes
>>> because of large text on one row is kinda painful, and not at all useful.
>
>> If you use the default format (\pset format aligned) in expanded mode, then
>> I agree with you we shouldn't print a half screen full of dashes to
>> separate every tuple.
>
> Don't think I agree. Suppose that you have a wider-than-screen table
> and you use a pager to scroll left and right in that. If we shorten the
> dashed lines, then once you scroll to the right of wherever they stop,
> you lose that visual cue separating the rows. This matters a lot if
> only a few of the column values are very wide: everywhere else, there's
> gonna be lots of whitespace.
For what it's worth, I'm with Josh and Jeff. My pager, like nearly
everybody else's, is less. And it's not stupid to have a behavior
that works reasonably with less's default settings. I haven't kept a
count of the number of times I've had to scroll down through endless
pages of dashes in order to find some data that's not dashes, but it's
surely quite a few.
Your point is also valid, so I don't mean to detract from that. But
the status quo is definitely annoying.
for those wishing to change the status quo the question is whether there needs to be a way to get back to the present behavior and, more generally, configure the behavior to taste while still having a reasonable default.
Losing a bit of usability in not being able to identify record boundaries while viewing off to the right seems is a trade-off that feels right to me. During interactive use SELECT * is quite useful but is hampered on relations that just happen to have a wide column that you don't care about but also don't want to waste the effort to specify all column names except that one.
So +1 from me.
David J.
В списке pgsql-hackers по дате отправления: