Re: Unicode UTF-8 table formatting for psql text output

Roger Leigh <rleigh@codelibre.net>

From: Roger Leigh <rleigh@codelibre.net>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
Date: 2009-10-26T00:10:50Z
Lists: pgsql-hackers

Attachments

On Sun, Oct 25, 2009 at 11:48:27PM +0000, Roger Leigh wrote:
> There's just one tiny display glitch I can see, and that's if you have
> mixed wrapping and newlines, you miss the lefthand wrap mark if the line
> is the last wrapped line and it ends in a newline.  It might not be
> possible to pick that up if we can't discover that from the line state
> when printing out the line.  Might possibly require storing the wrap
> state so we know what happened on the previous line, though if there's
> a slightly cleverer approach to detecting if we're already wrapped
> that would be better.

This appears simpler and more robust, so I've gone with this approach,
and attached a new patch which fixes it.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.