Re: printing table in asciidoc with psql - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: printing table in asciidoc with psql
Date
Msg-id 20141107213713.GT1791@alvin.alvh.no-ip.org
Whole thread Raw
In response to Re: printing table in asciidoc with psql  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: printing table in asciidoc with psql  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: printing table in asciidoc with psql  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
I did \o /tmp/tst, then
\dS
create table "eh | oh" ();
\dS

and then filtered the output file to HTML.  The CREATE TABLE tag ended
up in the same line as the title of the following table.  I think
there's a newline is missing somewhere.

The good news is that the | in the table name was processed correctly;
but I noticed that the table title is not using the escaped print, so I
would imagine that if I put a | in the title, things would go wrong.
(I don't know how to put titles on tables other than editing the
hardcoded titles for \ commands in psql).

Another thing is that spaces around the | seem gratuituous and produce
bad results.  I tried "select * from pg_class" which results in a very
wide table, and then the HTML output contains some cells with the values
in the second line; this makes all rows taller than they must be,
because some cells use the first line and other cells in the same row
use the second line for the text.  I hand-edited the asciidoc and
removed the spaces around | which makes the result nicer.  (Maybe
removing the trailing space is enough.)

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: split builtins.h to quote.h
Next
From: Tom Lane
Date:
Subject: Re: Representing a SRF return column in catalogs