Re: Proposed patch - psql wraps at window width

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Bryce Nesbitt <bryce2(at)obviously(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org, heikki(at)enterprisedb(dot)com
Subject: Re: Proposed patch - psql wraps at window width
Date: 2008-04-17 14:07:13
Message-ID: 200804171407.m3HE7EW24318@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Bryce Nesbitt wrote:
>
>
> Bruce Momjian wrote:
> > I spent time reviewing your patch --- quite impressive. I have attached
> > and updated version with mostly stylistic changes.
> >
> > In testing I found the regression tests were failing because of a divide
> > by zero error (fixed), and a missing case where the column delimiter has
> > to be ":". In fact I now see all your line continuation cases using ":"
> > rather than "!". It actually looks better --- "!" was too close to "|"
> > to be easily recognized. (Did you update your patch to use ":". I
> > didn't see "!" in your patch.)
> Nice! I'll merge with my current version. As you note I changed to ":".

Good, I thought so.

> I also found that for hugely wide output it was better to give up (do
> nothing), rather than mangle the output in a futile attempt to squash it
> to the window width. So there is one more clause in the wrapping if.

Was it because of performance? I have a way to fix that by decrementing
by more than one to shrink a column? I am attaching a new patch with my
improved loop. It remembers the previous maximum ratio.

> I have tested on several unix flavors, but not on Windows or cygwin.

I don't think you need to do that to get it applied --- there is nothing
windows-specific in your code.

Is this ready to be applied? Do you want to send a final update or are
you still testing?

--
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. +

Attachment Content-Type Size
unknown_filename text/plain 27.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-04-17 14:08:17 Re: Lessons from commit fest
Previous Message Alvaro Herrera 2008-04-17 14:04:51 Re: Lessons from commit fest

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-04-17 15:52:02 Re: Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout
Previous Message Peter Eisentraut 2008-04-17 13:18:54 Re: Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout