Re: Problem with displaying "wide" tables in psql

From: Emre Hasegeli <emre(at)hasegeli(dot)com>
To: Sergey Muraviov <sergey(dot)k(dot)muraviov(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Problem with displaying "wide" tables in psql
Date: 2014-02-15 16:08:01
Message-ID: CAE2gYzz6+ck+7CvswT1a5A7TqbN=AwCWwpW+gMLR2oaBxH51dg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

This is my review about 3th version of the patch. It is an useful
improvement in my opinion. It worked well on my environment.

2013-12-11 17:43:06, Sergey Muraviov <sergey(dot)k(dot)muraviov(at)gmail(dot)com>:
> It works in expanded mode when either format option is set to wrapped
> (\pset format wrapped), or we have no pager, or pager doesn't chop long
> lines (so you can still use the trick).

I do not like this logic on the IsWrappingNeeded function. It does not
seems right to check the environment variables for less. It would be hard
to explain this behavior to the users. It is better to make this only
the behavior of the wrapped format in expanded mode, in my opinion.

> {
> if (opt_border < 2)
> fprintf(fout, "%s\n", dlineptr[line_count].ptr);
> else
> fprintf(fout, "%-s%*s %s\n", dlineptr[line_count].ptr,
> dwidth - dlineptr[line_count].width, "",
> dformat->rightvrule);
> }

Is it necessary to keep this old print line code? It seems to me the new
code works well on (dlineptr[line_count].width <= dwidth) condition.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-02-15 16:17:12 Re: Memory ordering issue in LWLockRelease, WakeupWaiters, WALInsertSlotRelease
Previous Message Andres Freund 2014-02-15 16:02:15 Re: narwhal and PGDLLIMPORT