Re: printing table in asciidoc with psql

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Szymon Guz <mabewlun(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: printing table in asciidoc with psql
Date: 2014-10-30 09:38:16
Message-ID: CAFj8pRBwN35Wr6q5zDhpZfsxK7bJNqy7Uq6+7PYVUs-nWNiS0g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2014-10-30 9:30 GMT+01:00 Szymon Guz <mabewlun(at)gmail(dot)com>:

> On 30 October 2014 09:04, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>
>>
>>
>> 2014-10-29 12:23 GMT+01:00 Szymon Guz <mabewlun(at)gmail(dot)com>:
>>
>>>
>>>
>>> On 17 October 2014 09:01, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>>>
>>>> Hi Szymon
>>>>
>>>> I found a small bug - it doesn't escape "|" well
>>>>
>>>> postgres=# select * from mytab ;
>>>> a | numeric_b | c
>>>> ----------+-----------+------------
>>>> Ahoj | 10 | 2014-10-17
>>>> Hello | 20 | 2014-10-18
>>>> Hi | 30 | 2014-10-19
>>>> aaa|aaaa | 2222 | 2014-10-17
>>>> (4 rows)
>>>>
>>>> result
>>>>
>>>>
>>>> [options="header",cols="<literal,>literal,<literal",frame="all",grid="all"]
>>>> |====
>>>> ^| +++a+++ ^| +++numeric_b+++ ^| +++c+++
>>>> | Ahoj | 10 | 2014-10-17
>>>> | Hello | 20 | 2014-10-18
>>>> | Hi | 30 | 2014-10-19
>>>> | aaa|aaaa | 2222 | 2014-10-17
>>>> |====
>>>>
>>>>
>>>> Next, I tested it with asciidoc and asciidoctor and I have a problem
>>>> with asciidoctor - it doesn't respect aligning .. so numbers are aligned to
>>>> left instead to right.
>>>>
>>>> When you use a option "header" then a formatting "+++xxxx++++" is
>>>> useless.
>>>>
>>>
>>> Hi Pavel,
>>> thanks for the remarks. I've attached another version of the pach. It
>>> works a little better now, including escaping | and asciidoctor alignment
>>> support.
>>>
>>
>> it is fixed. Thank you.
>>
>> I fixed formatting - please, recheck it.
>>
>> I don't see any issue - it should be ready for commiter
>>
>> Regards
>>
>> Pavel
>>
>
>
> Hi Pavel,
> thanks for the review and reformatting. It looks much better after the
> reformatting.
>

ok

so

1. There are no any objections against proposed and implemented feature.
This patch contains just implementation of asciidoc format and nothing
else. It has zero impact on current code.

2. There are no problems with patching and compilation. All current regress
tests passed.

3. Patch contains doc and small set of regress tests.

4. I tested output against asciidoc and asciidoctor, I didn't find any
problems.

This patch is ready for commiter

Thank you for patch

Regards

Pavel

>
> thanks,
> Szymon
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2014-10-30 09:56:22 Re: alter user/role CURRENT_USER
Previous Message David Rowley 2014-10-30 09:23:38 Re: WIP: multivariate statistics / proof of concept