Re: Markdown format output for psql, design notes - Mailing list pgsql-hackers

From Lætitia Avrot
Subject Re: Markdown format output for psql, design notes
Date
Msg-id CAB_COdibhvhRJef8guQnaen7ug7x8afrzsmnh_pa=qvcdJ58Hg@mail.gmail.com
Whole thread Raw
In response to Re: Markdown format output for psql, design notes  ("Daniel Verite" <daniel@manitou-mail.org>)
Responses Re: Markdown format output for psql, design notes  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-hackers
Hi,

No I meant independently of the screen, if there's an LF character
in a cell. Or a '|' character, since that's the same problem: an
element of structure happening to be in the contents.
The specs mentioned upthread don't seem to give any indication
about that being supported.

i've given a list of characters that needs escaping as stated in the Markdown Extra doc and `|` is certainly one of this.

For LF caracter, I'm totally ok with the fact that it will break the markdown output and my answer to that is "KISS". I don't want to handle that case. Markdown Extra obviously decided that there was no such thing as a multiline row.
 
Say we have:
 SELECT E'foo\nbar' as "Header1", 'foo|bar' as "Header2"

If the markdown output was produced for the sole purpose of being
converted to HTML in the end, which is often the case, it would work
to use HTML entities in the output

I don't use Markdown to create a HTML output. I use it to generate pdf for my customers.

But as Vik said earlier, maybe it's not worth it to provide a markdown output as pandoc can generate the markdown from the HTML output.
And if you need the markdown output to generate HTML why don't you use the HTML output ?

Cheers,

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

pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: pgbench doc fix
Next
From: Simon Riggs
Date:
Subject: Re: pgsql: Avoid duplicate XIDs at recovery when building initial snapshot