pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nicolas Paris <niparisco@gmail.com>
To: pgsql-general@postgresql.org
Subject: psql format result as markdown tables
Date: Sat, 13 Jan 2018 10:50:55 +0100
Message-ID: <20180113095053.dlf6mj32wxqqgcgk@gmail.com> (raw)

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;
| column1 | column2| 
|---------|--------|-
|       1 |       2|
|       3 |       4|

Thanks by advance




view thread (6+ messages)  latest in thread

Message-ID: <20180113095053.dlf6mj32wxqqgcgk@gmail.com>
Permalink:  ../20180113095053.dlf6mj32wxqqgcgk@gmail.com/
Also on:    postgresql.org/message-id/20180113095053.dlf6mj32wxqqgcgk@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: niparisco@gmail.com
  Subject: Re: psql format result as markdown tables
  In-Reply-To: <20180113095053.dlf6mj32wxqqgcgk@gmail.com>
  References: <20180113095053.dlf6mj32wxqqgcgk@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox