pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: y.saburov@gmail.com
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Table 9.46. UUID Extraction Functions
Date: Sat, 10 Oct 2026 00:25:06 +0200
Message-ID: <176ada94989db19564e580b48c2b44be94a06d3e.camel@cybertec.at> (raw)
In-Reply-To: <2565626.1791524131@sss.pgh.pa.us>
References: <179143326813.1061054.14714458907175925072@wrigleys.postgresql.org>
	<15c6905385e3ca36756eefd06e73be57c9e6ae72.camel@cybertec.at>
	<2519947.1791477667@sss.pgh.pa.us>
	<419b7321d71f70a9390ea6a958525468473ba8c3.camel@cybertec.at>
	<2558476.1791516774@sss.pgh.pa.us>
	<d16be0c5e1f60366dfdc181b0ebd5cf2d213ecf7.camel@cybertec.at>
	<2565626.1791524131@sss.pgh.pa.us>

On Fri, 2026-10-09 at 01:35 -0400, Tom Lane wrote:
> Laurenz Albe <laurenz.albe@cybertec.at> 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

Attachments:

v1-0001-Remove-some-zero-width-spaces-in-the-docs.patch (text/x-patch, 2.7K) download From d638303166a4f68ab676aeb66e72f5cbb2c4e6d0 Mon Sep 17 00:00:00 2001 From: Laurenz Albe <laurenz.albe@cybertec.at> 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 <y.saburov@gmail.com> Author: Laurenz Albe <laurenz.albe@cybertec.at> Discussion: https://postgr.es/m/179143326813.1061054.14714458907175925072@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

view thread (12+ messages)  latest in thread

Message-ID: <176ada94989db19564e580b48c2b44be94a06d3e.camel@cybertec.at>
Permalink:  ../176ada94989db19564e580b48c2b44be94a06d3e.camel@cybertec.at/
Also on:    postgresql.org/message-id/176ada94989db19564e580b48c2b44be94a06d3e.camel@cybertec.at

 ·  · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: laurenz.albe@cybertec.at, tgl@sss.pgh.pa.us, y.saburov@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: Table 9.46. UUID Extraction Functions
  In-Reply-To: <176ada94989db19564e580b48c2b44be94a06d3e.camel@cybertec.at>

* 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