From: | Wim Bertels <wim(dot)bertels(at)khleuven(dot)be> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | psql latex and newlines |
Date: | 2011-12-12 18:15:12 |
Message-ID: | 1323713712.2454.14.camel@zwerfkat |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hallo,
psql latex output format needs to differentiate between a newline and a
tabularnewline.
the problem arises when u have a field value that contains a newline
character, when this field is not the first column, then all the data
after this newline comes in the first column..
u can try this out, writing a function or table,
and then add 'enters' or newline in the COMMENT on this function or
table.
the \pset recordsep doesn't solve this, since the mistakes take place
within the same record.
so first:
make some function of table
\o tofile
\pset format latex
\df+ \dt+ or ..
eg:
-- latex generated: with the wrong layout
\begin{tabular}{|c|l|}
\hline
\multicolumn{2}{|c|}{\textit{Record 1}} \\
\hline
entry1\_test & test \\
..
out\_result & TABLE(out\_field1 integer,\\ out\_field2 character
varying,\\ out\_del boolean) \\
out\_description & This function deletes a record\\ given the
following .. foreign\_key\_violation.\\ \\
\hline
Compared with text output, right layout:
-[ RECORD1 ]------------+--------------------------------------------------------------
entry1_test | test
..
out_resultdatatypes | TABLE(out_field1 integer,
: out_field2 character varying,
: out_del boolean)
out_description | This function deletes a record
: given the following ..
..
: .. foreign_key_violation.
mvg,
Wim
From | Date | Subject | |
---|---|---|---|
Next Message | Scot Kreienkamp | 2011-12-12 18:49:40 | initdb with lc-collate=C |
Previous Message | Wojciech Strzałka | 2011-12-12 18:05:15 | Re: Problem installing PG9.1 using yum |