On Fri, 2026-10-09 at 01:35 -0400, Tom Lane wrote: > Laurenz Albe <[email protected]> writes: > > On Thu, 2026-10-08 at 23:32 -0400, Tom Lane wrote: > > > I still wonder whether there's another solution path though. > > > We settled on &zwsp; because it fixed the major issue here, > > > but that doesn't mean there isn't a better answer. > > > I think that an improved version could look as follows: > > > uuid_extract_timestamp( > > '019535d9-3df7-79fb-b466-fa907fa17f9e'::uuid > > ) → 2025-02-23 21:46:24.503-05 > > Hmm, yeah, that could work so far as the PDF line-break problem > is concerned. Would it look too odd to HTML readers? > > > Also, not everything (query results etc.) are likely to be copied and > > pasted by users. So I guess the way forward would be for me to spend > > some time with this. But then - is it *that* important? > > Yup, that. If you want to press forward, have at it; I'm willing > to push fixes in this area.
I felt inspired enough to take a look, and I found only three places that looked like likely things that someone might copy and paste. The first didn't actually need a line break in either the US letter or A4 format, so I simply removed the &zwsp;. I wonder if some other documentation format might need it though... For the UUID functions that the complaint was about, I simply added regular spaces inside the parentheses, which in HTML looks like uuid_extract_version( '41db1265-8bc1-4ab3-992f-885799a4af1d'::uuid ) → 4 I'd say that that is acceptable. Yours, Laurenz Albe
From d638303166a4f68ab676aeb66e72f5cbb2c4e6d0 Mon Sep 17 00:00:00 2001 From: Laurenz Albe <[email protected]> Date: Sat, 10 Oct 2026 00:19:19 +0200 Subject: [PATCH v1] Remove some zero-width spaces in the docs To avoid warnings and lines that extend beyond the right page margin in the PDF documentation, we have zero-width spaces in the source at strategic places. They are not visible to the naked eye, but allow FOP to break the line. However, some of these zero-width spaces were in the middle of text that people might copy and paste from the HTML documentation, which leads to mysterious syntax errors. Scanning the documentation for &zwsp; identified three places that this patch improves: - an ISO 8601 interval literal didn't actually need a line break in both the US letter and A4 format, so simply remove the zero-width space - two examples for uuid_extract_version() had a zero-width space in the middle of an UUID literal, instead of which we can simply add regular spaces inside the parentheses Reported-By: Y. Saburov <[email protected]> Author: Laurenz Albe <[email protected]> Discussion: https://postgr.es/m/179143326813.1061054.14714458907175925...@wrigleys.postgresql.org --- doc/src/sgml/datatype.sgml | 2 +- doc/src/sgml/func/func-uuid.sgml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 89985ab7b16..a3869e2054c 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -3058,7 +3058,7 @@ SELECT '2 years 15 months 100 weeks 99 hours 123456789 milliseconds'::interval; <entry><literal>iso_8601</literal></entry> <entry>P1Y2M</entry> <entry>P3DT4H5M6S</entry> - <entry>P-1Y-2M3D&zwsp;T-4H-5M-6S</entry> + <entry>P-1Y-2M3DT-4H-5M-6S</entry> </row> </tbody> </tgroup> diff --git a/doc/src/sgml/func/func-uuid.sgml b/doc/src/sgml/func/func-uuid.sgml index 7b6181b38e7..56de8afd47c 100644 --- a/doc/src/sgml/func/func-uuid.sgml +++ b/doc/src/sgml/func/func-uuid.sgml @@ -161,11 +161,11 @@ return 4. </para> <para> - <literal>uuid_extract_version('41db1265-8bc1-4ab3-992f-&zwsp;885799a4af1d'::uuid)</literal> + <literal>uuid_extract_version( '41db1265-8bc1-4ab3-992f-885799a4af1d'::uuid )</literal> <returnvalue>4</returnvalue> </para> <para> - <literal>uuid_extract_version('019535d9-3df7-79fb-b466-&zwsp;fa907fa17f9e'::uuid)</literal> + <literal>uuid_extract_version( '019535d9-3df7-79fb-b466-fa907fa17f9e'::uuid )</literal> <returnvalue>7</returnvalue> </para></entry> </row> -- 2.56.0
