pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix translation of special characters in psql's LaTeX output mod
Date: Mon, 26 Nov 2018 22:33:09 +0000
Message-ID: <E1gRPRF-0004Mb-Rp@gemulon.postgresql.org> (raw)

Fix translation of special characters in psql's LaTeX output modes.

latex_escaped_print() mistranslated \ and failed to provide any translation
for # ^ and ~, all of which would typically lead to LaTeX document syntax
errors.  In addition it didn't translate < > and |, which would typically
render as unexpected characters.

To some extent this represents shortcomings in ancient versions of LaTeX,
which if memory serves had no easy way to render these control characters
as ASCII text.  But that's been fixed for, um, decades.  In any case there
is no value in emitting guaranteed-to-fail output for these characters.

Noted while fooling with test cases added by commit 9a98984f4.  Back-patch
the code change to all supported versions.

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b352cf7a80e0841017ca198f27f9da49d7256739

Modified Files
--------------
src/fe_utils/print.c | 36 ++++++++++++++++++++++++++++++------
1 file changed, 30 insertions(+), 6 deletions(-)



view thread (6+ messages)

Message-ID: <E1gRPRF-0004Mb-Rp@gemulon.postgresql.org>
Permalink:  ../E1gRPRF-0004Mb-Rp@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1gRPRF-0004Mb-Rp@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Fix translation of special characters in psql's LaTeX output mod
  In-Reply-To: <E1gRPRF-0004Mb-Rp@gemulon.postgresql.org>
  References: <E1gRPRF-0004Mb-Rp@gemulon.postgresql.org>

* 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