From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Cc: | Bryce Nesbitt <bryce2(at)obviously(dot)com> |
Subject: | Re: Proposed patch - psql wraps at window width |
Date: | 2008-05-08 17:08:33 |
Message-ID: | 200805081708.m48H8X315378@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Patch applied (yea!).
---------------------------------------------------------------------------
Bruce Momjian wrote:
> Bruce Momjian wrote:
> > Updated patch with clearer documentation that matches the above
> > behavior:
> >
> > ftp://momjian.us/pub/postgresql/mypatches/wrap
>
> I found a bug in my patch, particularly related to wrapping to pipes.
> Turns out if psql uses the pager internally:
>
> \pset format wrapped
>
> SELECT 1, 2, repeat('a', 80), repeat('b', 80), E'a\nb\nc\nd', 1
> FROM generate_series(1,50);
>
> it does not wrap to the screen width because of our default behavior of
> not wrapping pipe output by default. I had to add an is_pager boolean
> parameter to print_aligned_text(). (I tried passing is_pager via
> printTableOpt but it is a const.)
>
> I have updated the ftp URL to fix this.
>
> One item not addressed is that the 'wrapped' format wrapping could force
> output off the page without the pager being used if it is _near_ a full
> screen before wrapping. Of course we don't consider additional lines
> that wrap by extending past the right margin for non-wrapped mode, so
> perhaps it is OK.
>
> --
> 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. +
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
--
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 | Luis Vargas | 2008-05-08 17:11:58 | Execution Plan Cost |
Previous Message | Bruce Momjian | 2008-05-08 16:27:49 | Re: Remove hacks for old bad qsort() implementations? |