Re: proposal (9.5) : psql unicode border line styles

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: proposal (9.5) : psql unicode border line styles
Дата
Msg-id 20140911180827.GD16422@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: proposal (9.5) : psql unicode border line styles  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
* Pavel Stehule (pavel.stehule@gmail.com) wrote:
> 2014-09-11 16:42 GMT+02:00 Stephen Frost <sfrost@snowman.net>:
> > I don't particularly like this (having these fields set in
> > refresh_utf8format to hard-coded strings in the function), why not have
> > those handled the same as the rest, where the strings themselves are in
> > the unicode_style structure?
> >
>
> I am not sure if I understand well.
>
> With refresh_utf8format I can do shortly 6 possible combinations - or more
> (when it will be requested)
>
> I have no idea how to write as rest without repeating all 6 combinations -
> what was one noticed issue of some older variant, where I designed
> unicode1, unicode2, ...
>
> Any idea, tip how to it?

All I was suggesting was pulling these strings out of the function:

+   /* ↵ */
+   popt->header_nl_right = "\342\206\265";
+
+   popt->nl_left = " ";
+
+   /* ↵ */
+   popt->nl_right = "\342\206\265";
+
+   /* … */
+   popt->wrap_left = "\342\200\246";
+   popt->wrap_right = "\342\200\246";

and adding them to unicode_style and then referencing them there,
similar to how the rest of printTextFormat popt (by the way- don't
really like that variable name, particularly as it's used elsewhere with
a very different meaning..  why not 'format' or 'ptf'?) is
set up in refresh_utf8format, that's all.
Thanks,
    Stephen

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

Предыдущее
От: Arthur Silva
Дата:
Сообщение: Re: Memory Alignment in Postgres
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: proposal: ignore null fields in not relation type composite type based constructors