Re: pgsql and asciidoc output

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Steve Atkins <steve(at)blighty(dot)com>
Cc: PostgreSQL-general <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: pgsql and asciidoc output
Date: 2014-02-12 14:12:43
Message-ID: 20140212141243.GA3242@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Feb 11, 2014 at 03:32:32PM -0800, Steve Atkins wrote:
>
> On Feb 11, 2014, at 2:56 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> > Someone suggested that 'asciidoc'
> > (http://en.wikipedia.org/wiki/AsciiDoc) would be a good output format
> > for psql, similar to the existing output formats of html, latex, and
> > troff.
> >
> > Would this be useful?
>
> Less so than Markdown[1], IMO. (Or CSV or xlsx, come to that.)
>
> There’s a long list of potentially useful output formats. How pluggable
> is the output formatter?

It isn't hard to add new formats --- you are passed a table structure
and you printf the output. Here is the HTML format output function:

http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/bin/psql/print.c;h=79fc43eeda3330873acbea4ad1c555e051e81d00;hb=HEAD#l1394

I did the latex-longtable format for PG 9.3. The difficulty was
understanding the latex-longtable format specification, not writing the
C code.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2014-02-12 14:14:15 Re: pgsql and asciidoc output
Previous Message bobJobS 2014-02-12 13:47:14 Re: Streaming Replication - Error on Standby