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_COdjTtRVTZ_eoQk_PnjyT=BopeDWhF4xZTryKadjFAOvzOw@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
List pgsql-hackers

Le mer. 28 nov. 2018 à 16:25, Daniel Verite <daniel@manitou-mail.org> a écrit :
        Lætitia Avrot wrote:

> # The result I want
> From points 3 and 4, here is what I'd like to see :
>
> | Header 1 | Header 2 | Header 3 |
> |----------|----------|----------|
> | content | content | content |
> | content | content | content |
> (2 rows)

What would it look like when a field or a header is made of multiple
lines?

I suppose you mean in the standard output when the screen is too short to print the whole line ?
Because if the output is redirected to a file (with `\o myfile` for example), the line end naturally when the row ends.

That's a good question. Markdown Extra doesn't provide any solution in that case. Each newline means a new row.

I'd say that in that case markdown syntax will be broken and the user has to redirect the output in a file to have a right markdown syntax.... That case could be explained in the documentation.

So if we try with an example we'd have something like that :

| Header | Header | Header | Header | Header | Header |  Header | Header | Header | Header | Reallyreallyreallyreally
TooLongHeader | Header |
| content | content | content | content | content | content | content | content | content | content | Reallyreallyreallyreally
TooLongContent |content |
| content | content | content | content | content | content | content | content | content | content | Reallyreallyreallyreally
TooLongContent |content |
(2 rows)

I couldn't find a way to make it right. If you have a better idea, please share it :-)

Cheers,

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

pgsql-hackers by date:

Previous
From: Steve Crawford
Date:
Subject: Re: PostgreSQL Limits and lack of documentation about them.
Next
From: Alexander Korotkov
Date:
Subject: Re: jsonpath