From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | wombatbuddy(at)gmail(dot)com |
Cc: | pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: There is an invalid value for cidr type in the "Table 8.22. cidr Type Input Examples" |
Date: | 2024-08-05 23:29:59 |
Message-ID: | 1230606.1722900599@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
PG Doc comments form <noreply(at)postgresql(dot)org> writes:
> On the page:
> https://www.postgresql.org/docs/16/datatype-net-types.html#DATATYPE-CIDR
> in the "Table 8.22. cidr Type Input Examples"
> is invalid value for CIDR notation: 2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128
The value is correct as displayed:
=# select '2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128'::cidr;
cidr
--------------------------------------
2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128
(1 row)
However, if you try to copy-and-paste it from the web page,
you do indeed get a syntax error, or at least I do using Safari.
The reason is that there's a zero-width space hiding in there:
<row>
<entry>2001:4f8:3:ba:&zwsp;2e0:81ff:fe22:d1f1/128</entry>
<entry>2001:4f8:3:ba:&zwsp;2e0:81ff:fe22:d1f1/128</entry>
<entry>2001:4f8:3:ba:&zwsp;2e0:81ff:fe22:d1f1/128</entry>
</row>
and apparently copy-and-paste converts that into something
that cidr_in doesn't like. It doesn't like regular space
there either, so that's not so surprising.
I believe the &zwsp; got put in there to provide a line-break
opportunity and thus remove overwidth-line warnings in the
PDF docs build. There are a fair number of other places where
we do the same thing, although perhaps they are less likely
to be something somebody would try to copy-and-paste.
On the whole I'm inclined to do nothing here; these docs have to
satisfy a number of requirements, and "every example should be
copy-and-pasteable" doesn't seem like a good constraint to add.
Another idea perhaps could be to remove enough digits from the
example that it doesn't cause overwidth warnings in the PDF ---
but I'm not sure that's feasible in a 3-column table. Or we
could just drop this one example.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2024-08-05 23:42:53 | Re: There is an invalid value for cidr type in the "Table 8.22. cidr Type Input Examples" |
Previous Message | PG Doc comments form | 2024-08-05 14:29:12 | There is an invalid value for cidr type in the "Table 8.22. cidr Type Input Examples" |