Re: Proposed patch - psql wraps at window width

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Bryce Nesbitt <bryce2(at)obviously(dot)com>, pgsql-patches(at)postgresql(dot)org, heikki(at)enterprisedb(dot)com
Subject: Re: Proposed patch - psql wraps at window width
Date: 2008-04-21 16:15:44
Message-ID: 200804211615.m3LGFiA27528@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Alvaro Herrera wrote:
> Bruce Momjian wrote:
>
> > ! /* print a divider, middle columns only */
> > ! if ((j + 1) % col_count)
> > {
> > ! if (opt_border == 0)
> > ! fputc(' ', fout);
> > ! /* first line for values? */
> > ! else if (line_count == 0 && col_line_count == 0)
> > ! fputs(" | ", fout);
> > ! /* next value is beyond height? */
> > ! else if (line_count >= heights[j + 1])
> > ! fputs(" ", fout);
> > ! /* start of another newline string? */
> > ! else if (col_line_count == 0)
> > ! fputs(" : ", fout);
> > ! else
> > ! {
> > ! /* Does the next column wrap to this line? */
> > ! struct lineptr *this_line = &col_lineptrs[j+1][line_count];
> > ! bool string_done = *(this_line->ptr + bytes_output[j+1]) == 0;
> > !
> > ! fputs(string_done ? " " : " ; ", fout);
> > ! }
> > }
>
> I think it's a bad idea to use the same " : " separator in the two last
> cases. They are different and they should be displayed differently.

I confirmed with Alvaro that he didn't notice the first uses a colon and
the second a semicolon, so he is OK.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2008-04-21 16:16:32 Re: Regression test fails when BLCKSZ is 1kB
Previous Message Alvaro Herrera 2008-04-21 16:15:41 Re: Proposed patch - psql wraps at window width

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2008-04-21 16:21:25 Re: Proposed patch - psql wraps at window width
Previous Message Alvaro Herrera 2008-04-21 16:15:41 Re: Proposed patch - psql wraps at window width