Re: wrapping in extended mode doesn't work well with default pager

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: wrapping in extended mode doesn't work well with default pager
Дата
Msg-id CAM-w4HOWVS0y8H=CRXn_Snv-V7J=zVvS1h7XkiaHz1F-wEC6-g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: wrapping in extended mode doesn't work well with default pager  (Greg Stark <stark@mit.edu>)
Ответы Re: wrapping in extended mode doesn't work well with default pager
Список pgsql-hackers
On Mon, May 12, 2014 at 2:12 PM, Greg Stark <stark@mit.edu> wrote:
> Hm, there was an off by one error earlier in some cases, maybe we
> fixed it by breaking other case. Will investigate.

Those spaces are coming from the ascii wrapping indicators. i.e. the periods in:

+-----------------+--------------------+
|        a       +|         a         +|
|                +|         b          |
|        b        |                    |
+-----------------+--------------------+
| xx              | yyyyyyyyyyyyyyyyyy |
| xxxx           +| yyyyyyyyyyyyyyyy  +|
| xxxxxx         +| yyyyyyyyyyyyyy    +|
| xxxxxxxx       +| yyyyyyyyyyyy      +|
| xxxxxxxxxx     +| yyyyyyyyyy        +|
| xxxxxxxxxxxx   +| yyyyyyyy          +|
| xxxxxxxxxxxxxx +| yyyyyy            +|
| xxxxxxxxxxxxxxx.| yyyy              +|
|.x              +| yy                +|
| xxxxxxxxxxxxxxx.|                    |
|.xxx            +|                    |
| xxxxxxxxxxxxxxx.|                    |
|.xxxxx           |                    |
+-----------------+--------------------+

Apparently we used to print those with border=1 in normal mode but in
expanded mode we left out the space for those on the outermost edges
since there was no need for them. If we put them in for wrapped mode
then we'll be inconsistent if we don't for nonwrapped mode though. And
if we don't put them in for wrapped mode then there's no way to
indicate wrapping versus newlines.

The biggest difference it makes is that in the border=1 mode the lines
ended at the end of the data previously. Now it's expanded to fill the
rectangle because of the plus symbols. ie. It used to look like:

-[ RECORD 1 ]-----------
a | xx |
b |
a | yyyyyyyyyyyyyyyyyy
b |
-[ RECORD 2 ]-----------
a | xxxx | xxxxxx
b | xxxxxxxx | xxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxxxx | xxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx |
xxxxxxxxxxxxxxxxxxxx
a | yyyyyyyyyyyyyyyy
b | yyyyyyyyyyyyyy | yyyyyyyyyyyy | yyyyyyyyyy | yyyyyyyy | yyyyyy | yyyy | yy |

and now looks like:

-[ RECORD 1 ]-----------a+| xx +|b |a+| yyyyyyyyyyyyyyyyyyb |
-[ RECORD 2 ]-----------a+| xxxx                + +| xxxxxx              +b | xxxxxxxx            +  | xxxxxxxxxx
  +  | xxxxxxxxxxxx        +  | xxxxxxxxxxxxxx      +  | xxxxxxxxxxxxxxxx    +  | xxxxxxxxxxxxxxxxxx  +  |
xxxxxxxxxxxxxxxxxxxxa+|yyyyyyyyyyyyyyyy    +b | yyyyyyyyyyyyyy      +  | yyyyyyyyyyyy        +  | yyyyyyyyyy          +
| yyyyyyyy            +  | yyyyyy              +  | yyyy                +  | yy                  +  |
 



-- 
greg



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: pgaudit - an auditing extension for PostgreSQL
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: cannot to compile PL/V8 on Fedora 20