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

From Fabien COELHO
Subject Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki
Date
Msg-id alpine.DEB.2.20.1704181744450.13380@lancre
Whole thread Raw
In response to Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki  (Jan Michálek <godzilalalala@gmail.com>)
Responses Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki
List pgsql-hackers
Hello Jan,

>> It seems that the patch does not apply anymore on head due to changes in
>> psql non regression tests. Could you rebase?
>
> This should work on current master (all test passed).

Patch applies, compiles and make check is ok.

There are different flavour of markdown, maybe you should document which 
one is targetted. Should it be CommonMark? Another variant? Why?

ISTM that the md format lacks escaping for special md characters:
 fabien=# SELECT E'\\n\n</br>' AS foo; │     foo      │ |--------------| │ \n</br></br>

I'd say that you need to do escaping more or less similar to html?

Also, it seems that you use distinct vertical bar characters in the 
format? Or is this a trick of my terminal?? It seems that your patch 
introduces U+2502 (BOX DRAWINGS LIGHT VERTICAL) instead of the usual pipe 
in some places. Maybe you copy-pasted things from the unicode linestyle.

Why are *_newline variants added for length and formatting? Would it be 
possible to do without, say by relying on the line count computed by the 
standard function for instance?

The help line is too long, I would suggest not to add the new formats, 
the list is already truncated with "..." for other formats.

In the sgml documentation, you introduce tab characters, where only spaces 
should be used.

pg_markdown contains a spurious space between a comma and a newline.

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [HACKERS] PANIC in pg_commit_ts slru after crashes
Next
From: Amit Langote
Date:
Subject: Re: [HACKERS] Proposal: Local indexes for partitioned table