Re: [PATCH 5/6] psql: print_aligned_text uses table formatting

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Roger Leigh <rleigh(at)debian(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH 5/6] psql: print_aligned_text uses table formatting
Date: 2009-08-23 15:47:02
Message-ID: 20090823154702.GA5287@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Roger Leigh wrote:
> Convert print_aligned_text, and its helper function, to use
> table formatting in place of hardcoded ASCII characters.

> @@ -841,7 +856,10 @@ print_aligned_text(const printTableContent *cont, const printTextFormat *format,
>
> /* left border */
> if (opt_border == 2)
> - fputs("| ", fout);
> + {
> + fputs(format->vrule, fout);
> + fputc(' ', fout);
> + }
> else if (opt_border == 1)
> fputc(' ', fout);

Wouldn't it be better to do a single fprintf call here instead of
fputc + fputs?

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Grzegorz Jaskiewicz 2009-08-23 15:57:58 clang's static checker report.
Previous Message Kushal Vaghani 2009-08-23 15:16:43 Install from Source On Windows - University of Sydney Research