Official markdown doesn't support table formatting. Authors said we could just use HTML inside markdown to do so (it's quite not readable for a human, that's why I don't like this option) -> see here: https://daringfireball.net/projects/markdown/syntax#html
I want to make the patch as simple as possible, so I won't implement cell alignment
# 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)
+1
**'|' at beginning and end of line are optional in markdown extra, but it seems as a consensus to always add them. You may challenge this choice, I'm open to discussion.**
It feels to me that we should use the `\pset format` (or `-P` or `--pset=` in batch mode) syntax to tell psql we want markdown. So any of that one should provide a markdown output :
`psql -P format=markdown`
`psql --pset=format=markdown`
`\pset format markdown` (in psql prompt command)
# Code to change
If I want to code that patch, here are the files I think I'll need to change :
Documentation
doc/src/sgml/rel/psql-ref.sgml
src/bin/psql/help.c
Tests
src/test/regress/expected/psql.out
src/test/regress/sql/psql.sql
Code
src/bin/psql/command.c
src/bin/psql/tab-complete.c
**You're welcome to add any other file that I missed in that list!**
# What I'd like you to do
First, thanks to have read that whole mail and sorry I didn't mean to make it so long...
Then I'd like to know **what you think about what I'm about to do** before heading in a wrong direction.
Have a nice day,
Lætitia
--
Think! Do you really need to print this email ? There is no Planet B.