Adding Markodwn formatting to psql output

Started by Lætitia Avrotover 7 years ago6 messages
#1Lætitia Avrot
laetitia.avrot@gmail.com

Hi,

I write often documents for my customers in MarkDown to produce pdf
documents. Quite often, I need to present data from queries in a tabular
form.

Psql output provides formatting in text (aligned and unaligned), HTML,
latex, JSON (and so many more) but not in MarkDown. The aligned output is
quite similar to the MarkDown output. It seems quite easy to develop (so,
pretty great for my first real patch). To toggle it, I imagine, we could
use `pset markdown`.

My colleague (Jean-Christophe Arnu) and I worked a little on it, but I
think the difficulty lies in the "Do we want/need to add that feature ?"
question.

On the Pros side, I have "I would love it and use it all the time". On the
Cons side, I have "There are multiple flavors of markdown, which one do we
need to implement".

Any thoughts ?

Regards,

Lætitia
--
*Think! Do you really need to print this email ? *
*There is no Planet B.*

#2Euler Taveira
euler@timbira.com.br
In reply to: Lætitia Avrot (#1)
Re: Adding Markodwn formatting to psql output

2018-05-29 12:11 GMT-03:00 Lætitia Avrot <laetitia.avrot@gmail.com>:

I write often documents for my customers in MarkDown to produce pdf
documents. Quite often, I need to present data from queries in a tabular
form.

/messages/by-id/CAAYBy8YU4pXYKDHeQhsA_=FC93yOBZp5j1h=BSSAo9-oLcwNww@mail.gmail.com

--
Euler Taveira Timbira -
http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

#3Lætitia Avrot
laetitia.avrot@gmail.com
In reply to: Euler Taveira (#2)
Re: Adding Markodwn formatting to psql output

Le mar. 29 mai 2018 à 17:28, Euler Taveira <euler@timbira.com.br> a écrit :

2018-05-29 12:11 GMT-03:00 Lætitia Avrot <laetitia.avrot@gmail.com>:

I write often documents for my customers in MarkDown to produce pdf
documents. Quite often, I need to present data from queries in a tabular
form.

/messages/by-id/CAAYBy8YU4pXYKDHeQhsA_=FC93yOBZp5j1h=BSSAo9-oLcwNww@mail.gmail.com

Thanks a lot!

It seems that other people need that feature too. :-)

I will try to apply and review the patch.

--

Euler Taveira Timbira -
http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

--
*Think! Do you really need to print this email ? *
*There is no Planet B.*

#4Bruce Momjian
bruce@momjian.us
In reply to: Lætitia Avrot (#3)
Re: Adding Markodwn formatting to psql output

On Tue, May 29, 2018 at 06:47:54PM +0200, L�titia Avrot wrote:

Le�mar. 29 mai 2018 �17:28, Euler Taveira <euler@timbira.com.br> a �crit�:

2018-05-29 12:11 GMT-03:00 L�titia Avrot <laetitia.avrot@gmail.com>:

I write often documents for my customers in MarkDown to produce pdf
documents. Quite often, I need to present data from queries in a tabular
form.

/messages/by-id/CAAYBy8YU4pXYKDHeQhsA_=
FC93yOBZp5j1h=BSSAo9-oLcwNww@mail.gmail.com#CAAYBy8YU4pXYKDHeQhsA_=
FC93yOBZp5j1h=BSSAo9-oLcwNww@mail.gmail.com

Thanks a lot!

�It seems that other people need that feature too. :-)

I will try to apply and review the patch.

Uh, no one mentioned in this thread that psql has supported asciidoc
since PG 9.5.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +
#5Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Bruce Momjian (#4)
Re: Adding Markodwn formatting to psql output

On 2018-Jun-23, Bruce Momjian wrote:

On Tue, May 29, 2018 at 06:47:54PM +0200, L�titia Avrot wrote:

Le�mar. 29 mai 2018 �17:28, Euler Taveira <euler@timbira.com.br> a �crit�:

2018-05-29 12:11 GMT-03:00 L�titia Avrot <laetitia.avrot@gmail.com>:

I write often documents for my customers in MarkDown to produce pdf
documents. Quite often, I need to present data from queries in a tabular
form.

/messages/by-id/CAAYBy8YU4pXYKDHeQhsA_=
FC93yOBZp5j1h=BSSAo9-oLcwNww@mail.gmail.com#CAAYBy8YU4pXYKDHeQhsA_=
FC93yOBZp5j1h=BSSAo9-oLcwNww@mail.gmail.com

Thanks a lot!

�It seems that other people need that feature too. :-)

I will try to apply and review the patch.

Uh, no one mentioned in this thread that psql has supported asciidoc
since PG 9.5.

I would welcome markdown output, particularly some version that can be
processed nicely by pandoc :-)

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#6Vik Fearing
vik.fearing@2ndquadrant.com
In reply to: Alvaro Herrera (#5)
Re: Adding Markodwn formatting to psql output

On 23/06/18 17:01, Alvaro Herrera wrote:

On 2018-Jun-23, Bruce Momjian wrote:

On Tue, May 29, 2018 at 06:47:54PM +0200, Lætitia Avrot wrote:

I will try to apply and review the patch.

Uh, no one mentioned in this thread that psql has supported asciidoc
since PG 9.5.

I would welcome markdown output, particularly some version that can be
processed nicely by pandoc :-)

I use latex format for that, but I also welcome a markdown format.
--
Vik Fearing +33 6 46 75 15 36
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support