Re: printing table in asciidoc with psql

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: printing table in asciidoc with psql
Дата
Msg-id CAB7nPqRYdQ6j5XBfdyKGKsvKxHG-17psFbuRxDM2E_b9-HdiEg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: printing table in asciidoc with psql  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: printing table in asciidoc with psql  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On Tue, Mar 24, 2015 at 8:44 AM, Bruce Momjian wrote:
> Notice the added 'l' next to the '<'.  Updated patch attached.  Any
> other issues?

Ah, right. That's a good catch and your patch fixes the issue. Still,
there are problems with the tuple-only mode and the expanded mode. For
example using this example (wanted over-complicated):
create table "5 2.2+^.^" ("5 2.2+^.^" text, "4 2.2+^.^" text);
insert into "5 2.2+^.^" values ('5 2.2+^.^', '4 2.2+^.^');
insert into "5 2.2+^.^" values ('2 2.2+^.^', '3 2.2+^.^');
\pset format asciidoc

-- This prints first tuple as a header (which transforms "^.^" to "."
btw), 2nd as a normal row:
=# table "5 2.2+^.^" ;
[options="header",cols="<l,<l",frame="none"]
|====
|5 2.2+^.^ |4 2.2+^.^|2 2.2+^.^ |3 2.2+^.^
|====
Time: 0.451 ms

And with the expanded mode this has an incorrect format:
=# \x
Expanded display is on.
=# table "5 2.2+^.^" ;

[cols="h,l",frame="none"]
|====
2|
<l|5 2.2+^.^ <|5 2.2+^.^
<l|4 2.2+^.^ <|4 2.2+^.^
2|
<l|5 2.2+^.^ <|2 2.2+^.^
<l|4 2.2+^.^ <|3 2.2+^.^
|====
Time: 0.555 ms

Regards,
-- 
Michael



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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: Typos in CREATE TABLE doc
Следующее
От: Etsuro Fujita
Дата:
Сообщение: Re: inherit support for foreign tables