From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Bryce Nesbitt <bryce2(at)obviously(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: psql wrapped format default for backslash-d commands |
Date: | 2008-06-30 19:41:22 |
Message-ID: | 200806301941.m5UJfMR26568@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bryce Nesbitt wrote:
>
> Brendan Jurd wrote:
> > I really like the idea of wrapping, but after playing with the format
> > a bit myself, I have to agree with Tom that breaking in the middle of
> > words produces some very nasty output.
> >
> > If the format could be improved to only wrap on word boudaries, that
> > would increase its appeal dramatically.
> >
> > Anybody got a rough idea how difficult it would be to add
> > word-awareness int o the wrapping code?
>
> I chose not to, when writing the patch, because it makes the result flow
> over many more lines.
> And regardless, it pretty much has to cut long "words", of which there
> are many in typical SQL output.
> And, I hardly ever read actual large blocks of English at the SQL
> prompt, so: designing for that use case did
> not float my boat at the time.
> And, word wrapping messes with the cell contents more than I was
> comfortable doing. With the current wrapping all whitespace is preserved
> and apparent.
>
> But, if your boat is floated, then by all means go for it.
Added to TODO:
o Add option to wrap column values at whitespace boundaries,
rather than chopping them at a fixed width.
Currently, "wrapped" format chops values into fixed
widths. Perhaps the word wrapping could use the same
algorithm documented in the W3C specification.
http://archives.postgresql.org/pgsql-hackers/2008-05/msg00404.php
http://www.w3.org/TR/CSS21/tables.html#auto-table-layout
--
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. +
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2008-06-30 19:45:28 | Re: psql wrapped format default for backslash-d commands |
Previous Message | Ana Carolina Brito de Almeida | 2008-06-30 19:12:11 | Bucket and batch |