Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki - Mailing list pgsql-hackers

From Leknín Řepánek
Subject Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki
Date
Msg-id 20170223185622.GG675@gmail.com
Whole thread Raw
In response to Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
I was mainly using tables in rst, i think, that this format is very
similar to "grid tables" in markdown. And it is really similar to default borders used
in psql with border 2.

On Thu, Feb 23, 2017 at 12:06:36PM -0300, Alvaro Herrera wrote:
> Jan Michálek wrote:
> 
> > Is there posibility, that support for some others formats will be added in
> > the future? Or id posible to create some of this formats by manipulating
> > with pset? Or I need use xml for export and use some xslt templates, or
> > lxml etc. to create format that I will be able to copy on wiki page or in
> > github issue.
> 
> I would love to have something that generates Markdown tables.  One of
> the goals of psql is to make common tasks easy, and IMO generating
> tables in formats commonly used in documents is one such task.
> 
> I think we discussed the idea of Markdown awhile ago, and eventually
> found out that you absolutely need to align things following some crazy
> rules, or the markdown processor just gives up on them.  (It works fine
> for simple table contents, but if you have to escape a character
> somewhere, then the alignment needs to subtract the escaping character,
> or something like that)
> 
> The pandoc document http://pandoc.org/MANUAL.html#tables appears to
> suggest we could use "pipe tables" to get rid of the alignment
> requirement, but then the result is ugly.  It's a pity that multiline
> rows don't work in that mode, also.
> 
> If you come up with code to generate good pandoc Markdown tables, I am
> happy to help.
> 
> -- 
> Álvaro Herrera                https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)