Skip to content

Commit 1c53f61

Browse files
committed
Escape < and & in SGML
This is not required in SGML, but will be in XML, so this is a step to prepare for the conversion to XML. (It is still not required to escape >, but we did it here in some cases for symmetry.) Add a command-line option to osx/onsgmls calls to warn about unescaped occurrences in the future. Author: Alexander Law <exclusion@gmail.com> Author: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
1 parent 8689e38 commit 1c53f61

14 files changed

+29
-26
lines changed

doc/src/sgml/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,13 @@ ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) $(GENERATED_SGML)
6666
# Enable some extra warnings
6767
# -wfully-tagged needed to throw a warning on missing tags
6868
# for older tool chains, 2007-08-31
69-
# Note: try "make SPFLAGS=-wxml" to catch a lot of other dubious constructs,
70-
# in particular < and & that haven't been made into entities. It's far too
71-
# noisy to turn on by default, unfortunately.
7269
override SPFLAGS += -wall -wno-unused-param -wno-empty -wfully-tagged
70+
# Additional warnings for XML compatibility. The conditional is meant
71+
# to detect whether we are using OpenSP rather than the ancient
72+
# original SP.
73+
ifneq (,$(filter o%,$(notdir $(OSX))))
74+
override SPFLAGS += -wdata-delim
75+
endif
7376

7477

7578
##

doc/src/sgml/array.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ SELECT * FROM
654654
For instance:
655655

656656
<programlisting>
657-
SELECT * FROM sal_emp WHERE pay_by_quarter && ARRAY[10000];
657+
SELECT * FROM sal_emp WHERE pay_by_quarter &amp;&amp; ARRAY[10000];
658658
</programlisting>
659659

660660
This and other array operators are further described in

doc/src/sgml/fdwhandler.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -696,9 +696,9 @@ IsForeignRelUpdatable (Relation rel);
696696
The return value should be a bit mask of rule event numbers indicating
697697
which operations are supported by the foreign table, using the
698698
<literal>CmdType</> enumeration; that is,
699-
<literal>(1 << CMD_UPDATE) = 4</> for <command>UPDATE</>,
700-
<literal>(1 << CMD_INSERT) = 8</> for <command>INSERT</>, and
701-
<literal>(1 << CMD_DELETE) = 16</> for <command>DELETE</>.
699+
<literal>(1 &lt;&lt; CMD_UPDATE) = 4</> for <command>UPDATE</>,
700+
<literal>(1 &lt;&lt; CMD_INSERT) = 8</> for <command>INSERT</>, and
701+
<literal>(1 &lt;&lt; CMD_DELETE) = 16</> for <command>DELETE</>.
702702
</para>
703703

704704
<para>

doc/src/sgml/plpgsql.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,8 +1823,8 @@ $BODY$
18231823
BEGIN
18241824
RETURN QUERY SELECT flightid
18251825
FROM flight
1826-
WHERE flightdate >= $1
1827-
AND flightdate < ($1 + 1);
1826+
WHERE flightdate &gt;= $1
1827+
AND flightdate &lt; ($1 + 1);
18281828

18291829
-- Since execution is not finished, we can check whether rows were returned
18301830
-- and raise exception if not.

doc/src/sgml/ref/alter_operator.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ ALTER OPERATOR @@ (text, text) OWNER TO joe;
134134
</programlisting></para>
135135

136136
<para>
137-
Change the restriction and join selectivity estimator functions of a custom operator <literal>a && b</literal> for type <type>int[]</type>:
137+
Change the restriction and join selectivity estimator functions of a custom operator <literal>a &amp;&amp; b</literal> for type <type>int[]</type>:
138138
<programlisting>
139-
ALTER OPERATOR && (_int4, _int4) SET (RESTRICT = _int_contsel, JOIN = _int_contjoinsel);
139+
ALTER OPERATOR &amp;&amp; (_int4, _int4) SET (RESTRICT = _int_contsel, JOIN = _int_contjoinsel);
140140
</programlisting></para>
141141

142142
</refsect1>

doc/src/sgml/ref/create_view.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ CREATE VIEW comedies AS
466466
CREATE RECURSIVE VIEW public.nums_1_100 (n) AS
467467
VALUES (1)
468468
UNION ALL
469-
SELECT n+1 FROM nums_1_100 WHERE n < 100;
469+
SELECT n+1 FROM nums_1_100 WHERE n &lt; 100;
470470
</programlisting>
471471
Notice that although the recursive view's name is schema-qualified in this
472472
<command>CREATE</>, its internal self-reference is not schema-qualified.

doc/src/sgml/ref/pgtesttiming.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
nanoseconds. This example from an Intel i7-860 system using a TSC clock
9595
source shows excellent performance:
9696

97-
<screen>
97+
<screen><![CDATA[
9898
Testing timing overhead for 3 seconds.
9999
Per loop time including overhead: 35.96 ns
100100
Histogram of timing durations:
@@ -104,7 +104,7 @@ Histogram of timing durations:
104104
4 0.00015 126
105105
8 0.00002 13
106106
16 0.00000 2
107-
</screen>
107+
]]></screen>
108108
</para>
109109

110110
<para>
@@ -152,7 +152,7 @@ EXPLAIN ANALYZE SELECT COUNT(*) FROM t;
152152
possible from switching to the slower acpi_pm time source, on the same
153153
system used for the fast results above:
154154

155-
<screen>
155+
<screen><![CDATA[
156156
# cat /sys/devices/system/clocksource/clocksource0/available_clocksource
157157
tsc hpet acpi_pm
158158
# echo acpi_pm > /sys/devices/system/clocksource/clocksource0/current_clocksource
@@ -165,7 +165,7 @@ Histogram of timing durations:
165165
4 0.07810 3241
166166
8 0.01357 563
167167
16 0.00007 3
168-
</screen>
168+
]]></screen>
169169
</para>
170170

171171
<para>
@@ -201,7 +201,7 @@ kern.timecounter.hardware: ACPI-fast -> TSC
201201
implementation, which can have good resolution when it's backed by fast
202202
enough timing hardware, as in this example:
203203

204-
<screen>
204+
<screen><![CDATA[
205205
$ cat /sys/devices/system/clocksource/clocksource0/available_clocksource
206206
jiffies
207207
$ dmesg | grep time.c
@@ -218,7 +218,7 @@ Histogram of timing durations:
218218
8 0.00007 22
219219
16 0.00000 1
220220
32 0.00000 1
221-
</screen></para>
221+
]]></screen></para>
222222

223223
</refsect2>
224224

doc/src/sgml/release-8.4.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@
962962
to fix all pre-existing data errors. However, an installation can be
963963
presumed safe after performing this vacuuming if it has executed fewer
964964
than 2^31 update transactions in its lifetime (check this with
965-
<literal>SELECT txid_current() < 2^31</>).
965+
<literal>SELECT txid_current() &lt; 2^31</>).
966966
</para>
967967
</listitem>
968968

doc/src/sgml/release-9.0.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2900,7 +2900,7 @@
29002900
to fix all pre-existing data errors. However, an installation can be
29012901
presumed safe after performing this vacuuming if it has executed fewer
29022902
than 2^31 update transactions in its lifetime (check this with
2903-
<literal>SELECT txid_current() < 2^31</>).
2903+
<literal>SELECT txid_current() &lt; 2^31</>).
29042904
</para>
29052905
</listitem>
29062906

doc/src/sgml/release-9.1.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4654,7 +4654,7 @@ Branch: REL9_0_STABLE [9d6af7367] 2015-08-15 11:02:34 -0400
46544654
to fix all pre-existing data errors. However, an installation can be
46554655
presumed safe after performing this vacuuming if it has executed fewer
46564656
than 2^31 update transactions in its lifetime (check this with
4657-
<literal>SELECT txid_current() < 2^31</>).
4657+
<literal>SELECT txid_current() &lt; 2^31</>).
46584658
</para>
46594659
</listitem>
46604660

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy