]> granicus.if.org Git - postgresql/commit
Fix translation of special characters in psql's LaTeX output modes.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 26 Nov 2018 22:32:51 +0000 (17:32 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 26 Nov 2018 22:32:51 +0000 (17:32 -0500)
commitb352cf7a80e0841017ca198f27f9da49d7256739
treea5ac966e91e90f29904f06ae93b0555820dcce7e
parent6a13deffd4983bcc0b21f4df0a5d86cd94b6e05a
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.
src/fe_utils/print.c