Re: psql format result as markdown tables

2018-01-14 Thread Vick Khera
How does this work for you? I use this to get tables to insert into my wiki, which are basically the format you want. I just delete the extra lines I don't want at the end. vk=> SELECT * FROM (values(1,2),(3,4)) as t; column1 | column2 -+- 1 | 2 3 | 4 (2

Re: psql format result as markdown tables

2018-01-13 Thread Tom Lane
Stephen Frost writes: > I suspect that if someone wanted to write the code to have markdown be > available that it would certainly be accepted, as that's definitely a > popular format. Somebody was working on that awhile ago, https://www.postgresql.org/message-id/flat/CAAYBy8YU4pXYKDHeQhsA_%3DFC

Re: psql format result as markdown tables

2018-01-13 Thread Stephen Frost
Greetings Melvin, * Melvin Davidson (melvin6...@gmail.com) wrote: > On Sat, Jan 13, 2018 at 4:50 AM, Nicolas Paris wrote: > > I wonder if someone knows how to configure psql to output results as > > markdown tables. > > Then instead of : > > > > SELECT * FROM (values(1,2),(3,4)) as t; > > column

Re: psql format result as markdown tables

2018-01-13 Thread Stephen Frost
Hi Nicolas! * Nicolas Paris (nipari...@gmail.com) wrote: > I wonder if someone knows how to configure psql to output results as > markdown tables. Unfortunately, I don't believe we support markdown as an output format as yet. To change the output format, you can use '\pset format html'. You ca

Re: psql format result as markdown tables

2018-01-13 Thread Melvin Davidson
On Sat, Jan 13, 2018 at 4:50 AM, Nicolas Paris wrote: > Hello > > I wonder if someone knows how to configure psql to output results as > markdown tables. > Then instead of : > > SELECT * FROM (values(1,2),(3,4)) as t; > column1 | column2 > -+- >1 | 2 >3 |

psql format result as markdown tables

2018-01-13 Thread Nicolas Paris
Hello I wonder if someone knows how to configure psql to output results as markdown tables. Then instead of : SELECT * FROM (values(1,2),(3,4)) as t; column1 | column2 -+- 1 | 2 3 | 4 Get the result as : SELECT * FROM (values(1,2),(3,4)) as t; | colum