Skip site navigation (1) Skip section navigation (2)

Re: Proposed patch - psql wraps at window width

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
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 15:59:25
Message-ID: 20080421155925.GS6520@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2008-04-21 16:11:20
Subject: Re: TODO, FAQs to Wiki?
Previous:From: Alvaro HerreraDate: 2008-04-21 15:55:02
Subject: Re: TODO, FAQs to Wiki?

pgsql-patches by date

Next:From: Alvaro HerreraDate: 2008-04-21 16:15:41
Subject: Re: Proposed patch - psql wraps at window width
Previous:From: Bruce MomjianDate: 2008-04-21 15:45:52
Subject: Re: float4/float8/int64 passed by value with tsearchfixup

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group