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

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

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Roger Leigh <rleigh(at)codelibre(dot)net>
Cc: Roger Leigh <rleigh(at)debian(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH 5/6] psql: print_aligned_text uses table formatting
Date: 2009-08-23 22:29:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Roger Leigh wrote:
> On Sun, Aug 23, 2009 at 11:47:02AM -0400, Alvaro Herrera wrote:

> > Wouldn't it be better to do a single fprintf call here instead of
> > fputc + fputs?
> It's certainly possible to change it; the above might be slightly more
> efficient than a call to fprintf since you skip parsing the format
> string, but otherwise I have no real preference for one over the
> other.

There are already other fprintf calls in the same function -- I wouldn't
worry too much about some hypothetical performance gain.  Let's keep
things simple and readable.

Alvaro Herrera                      
The PostgreSQL Company - Command Prompt, Inc.

In response to

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2009-08-23 22:33:49
Subject: Re: Unicode UTF-8 table formatting for psql text output
Previous:From: Grzegorz JaskiewiczDate: 2009-08-23 22:16:59
Subject: Re: clang's static checker report.

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