On Tue, Aug 25, 2009 at 10:32:50PM -0400, Alvaro Herrera wrote:
> Roger Leigh escribió:
> 
> > An updated copy of the patch is attached.
> 
> Did you give expanded output a look?  (\x)  I find it a bit weird that
> the first line shows a single-pixel wide line but the subsequent ones
> are thicker.

Yes, it's just due to the fact that the middle lines are using a
thicker line character, while the top and bottom lines are thin.
This can easily be changed to be e.g. all thin.

> BTW I think you should also look at multiline fields,
> 
>  a │                                           b                              
>              
> ━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
>  4 │ some text
>    : and some more
>    : and then some
> (1 filas)
> 
> And wrapped:
> 
> alvherre=# select * from foo;
>  a │                                     b                                    
>   
> ━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
>  5 │ En un lugar de la Mancha, de cuyo nombre no quiero acordarme, no ha 
> mucho 
>    ; tiempo que vivía un hidalgo
> (1 fila)

I initially left these exactly the same as for ASCII (the ':' and ';'
usage).  However, it's quite possible to make it use other characters.
We could use the same lines, or two, three or four dashed lines
('╎' and '╏', or ┆' and '┇' or '┊' and '┋').
There are also additional characters such as half-lines
('╶', '╷', '╹' and '╻').  Is this the kind of this you are referring
to?

The wrapping code also appears slightly broken anyway, since
continuation lines don't get '|' printed for subsequent blank columns
on the same line:

# SELECT * FROM testw;
 a │          b          │ c │ kfduagahkjdfghalksdkfhajsdkl 
━━━┿━━━━━━━━━━━━━━━━━━━━━┿━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 1 │ This is a test stri │   │                              
   ; ng
 2 │ sbuild-createchroot │   │
   ;  installs build-ess
   ; entials so your wor
   ; king
 3 │ sbuild-createchroot │   │
   ;  installs build-ess
   ; entials so your wor
   ; king environment sh
   ; ould already be ok.
   ;  You will need only
   ;  to add a few more
   ; packages in the chr
   ; oot, using e.g.
(3 rows)

(this is unchanged from psql behaviour in CVS.)

I also see in the code that under some circumstances (curr_nl_line), a
'+' is used instead of a space when printing table headers, but I
haven't been able to trigger this yet.  We could also use dashed
horizontal rules here.


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.

Attachment: signature.asc
Description: Digital signature

Reply via email to