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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Unicode UTF-8 table formatting for psql text output
Дата
Msg-id 20090827140326.GB11213@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Unicode UTF-8 table formatting for psql text output  (Roger Leigh <rleigh@codelibre.net>)
Ответы Re: Unicode UTF-8 table formatting for psql text output  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Roger Leigh escribió:
> 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.

Yeah, I think expanded output should use the same char for all lines.

> > 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 '┋').

This works for me (say ╎ for newline-separated strings and ┊ for wrapped
output).

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

Yeah ... maybe there's a point to this, or maybe it's just a bug -- I
don't know.

> 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.

Hmm, can't say I know what's this about.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: 8.5 release timetable, again
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: 8.5 release timetable, again