Re: Markdown format output for psql, design notes

From: Lætitia Avrot <laetitia(dot)avrot(at)gmail(dot)com>
To: daniel(at)manitou-mail(dot)org
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Markdown format output for psql, design notes
Date: 2018-11-28 19:57:28
Message-ID: CAB_COdjTtRVTZ_eoQk_PnjyT=BopeDWhF4xZTryKadjFAOvzOw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le mer. 28 nov. 2018 à 16:25, Daniel Verite <daniel(at)manitou-mail(dot)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.*

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2018-11-28 20:26:35 Re: jsonpath
Previous Message Steve Crawford 2018-11-28 19:17:00 Re: PostgreSQL Limits and lack of documentation about them.