Re: 9.5Beta1 psql wrapped format expanded output - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: 9.5Beta1 psql wrapped format expanded output
Date
Msg-id CAMkU=1wEr=T9vaUD6WtahOuMpzv6G+ibJkqP5AKvcH6d9+2=sw@mail.gmail.com
Whole thread Raw
In response to Re: 9.5Beta1 psql wrapped format expanded output  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: 9.5Beta1 psql wrapped format expanded output  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 23, 2015 at 5:11 PM, Jeff Janes <span
dir="ltr"><<ahref="mailto:jeff.janes@gmail.com" target="_blank">jeff.janes@gmail.com</a>></span> wrote:<br
/><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span
class="">OnFri, Oct 23, 2015 at 3:06 PM, Tom Lane <<a href="mailto:tgl@sss.pgh.pa.us">tgl@sss.pgh.pa.us</a>>
wrote:<br/> > Alvaro Herrera <<a href="mailto:alvherre@2ndquadrant.com">alvherre@2ndquadrant.com</a>>
writes:<br/> >> Jeff Janes wrote:<br /> >>> When I use psql with wrapped format with expanded output, I
getthe<br /> >>> period that is supposed to be at the end of the line being at the<br /> >>>
beginningof the next line.<br /> >>><br /> >>> Can anyone else verify this?  I want to verify it is
notsome local<br /> >>> issue before looking into it too far.<br /> ><br /> >> Yes, I see it too.<br
/>><br /> > Me too.  It looks like the code is overoptimistic about how much data<br /> > it can print on one
line.<br/> ><br /> > 9.4 does not seem to try to wrap at all in this case.<br /><br /></span>Yeah, support for
wrappingin the extended format was added in 9.4 but<br /> reverted from that branch.<br /><br /> This patch seems to
fixthe problem although I don't fully understand why.<br /><br /> The reason swidth is 3 greater with border 1 than it
iswith border 0<br /> is that border 1 reserves a space at the right edge for the<br /> continuation period, while
border0 doesn't reserve a space and simply<br /> takes it out of the printable area if needed.<br /><br /> Why swidth
forborder 2 is three greater than it is with border 1, I<br /> don't really know.<br /></blockquote></div><br
/></div><divclass="gmail_extra">Now I see why.  Border 2 doesn't just add a '|' on either end of the line, but also
addsa space to the left end, so that the "column" name is not hard up against the preceding '|'<br /><br /></div><div
class="gmail_extra">SoI think my patch is correct.<br /><br /></div><div class="gmail_extra">Cheers,<br /><br
/></div><divclass="gmail_extra">Jeff<br /></div></div> 

pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')
Next
From: Peter Eisentraut
Date:
Subject: Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')