Skip to content

Commit 8508402

Browse files
committed
Fix indentation of verbatim block elements
Block elements with verbatim formatting (literallayout, programlisting, screen, synopsis) should be aligned at column 0 independent of the surrounding SGML, because whitespace is significant, and indenting them creates erratic whitespace in the output. The CSS stylesheets already take care of indenting the output. Assorted markup improvements to go along with it.
1 parent c04b3f4 commit 8508402

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2404
-2510
lines changed

doc/src/sgml/auto-explain.sgml

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/auto-explain.sgml,v 1.8 2010/04/03 07:22:52 petere Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/auto-explain.sgml,v 1.8.2.1 2010/07/29 19:34:36 petere Exp $ -->
22

33
<sect1 id="auto-explain">
44
<title>auto_explain</title>
@@ -19,9 +19,9 @@
1919
The module provides no SQL-accessible functions. To use it, simply
2020
load it into the server. You can load it into an individual session:
2121

22-
<programlisting>
22+
<programlisting>
2323
LOAD 'auto_explain';
24-
</programlisting>
24+
</programlisting>
2525

2626
(You must be superuser to do that.) More typical usage is to preload
2727
it into all sessions by including <literal>auto_explain</> in
@@ -163,45 +163,44 @@ LOAD 'auto_explain';
163163
<xref linkend="guc-custom-variable-classes">. Typical usage might be:
164164
</para>
165165

166-
<programlisting>
166+
<programlisting>
167167
# postgresql.conf
168168
shared_preload_libraries = 'auto_explain'
169169

170170
custom_variable_classes = 'auto_explain'
171171
auto_explain.log_min_duration = '3s'
172-
</programlisting>
172+
</programlisting>
173173
</sect2>
174174

175175
<sect2>
176176
<title>Example</title>
177177

178-
<programlisting>
179-
postgres=# LOAD 'auto_explain';
180-
postgres=# SET auto_explain.log_min_duration = 0;
181-
postgres=# SELECT count(*)
182-
FROM pg_class, pg_index
183-
WHERE oid = indrelid AND indisunique;
184-
</programlisting>
178+
<programlisting>
179+
postgres=# LOAD 'auto_explain';
180+
postgres=# SET auto_explain.log_min_duration = 0;
181+
postgres=# SELECT count(*)
182+
FROM pg_class, pg_index
183+
WHERE oid = indrelid AND indisunique;
184+
</programlisting>
185185

186186
<para>
187187
This might produce log output such as:
188188
</para>
189189

190-
<programlisting><![CDATA[
191-
LOG: duration: 3.651 ms plan:
192-
Query Text: SELECT count(*)
193-
FROM pg_class, pg_index
194-
WHERE oid = indrelid AND indisunique;
195-
Aggregate (cost=16.79..16.80 rows=1 width=0) (actual time=3.626..3.627 rows=1 loops=1)
196-
-> Hash Join (cost=4.17..16.55 rows=92 width=0) (actual time=3.349..3.594 rows=92 loops=1)
197-
Hash Cond: (pg_class.oid = pg_index.indrelid)
198-
-> Seq Scan on pg_class (cost=0.00..9.55 rows=255 width=4) (actual time=0.016..0.140 rows=255 loops=1)
199-
-> Hash (cost=3.02..3.02 rows=92 width=4) (actual time=3.238..3.238 rows=92 loops=1)
200-
Buckets: 1024 Batches: 1 Memory Usage: 4kB
201-
-> Seq Scan on pg_index (cost=0.00..3.02 rows=92 width=4) (actual time=0.008..3.187 rows=92 loops=1)
202-
Filter: indisunique
203-
]]>
204-
</programlisting>
190+
<screen><![CDATA[
191+
LOG: duration: 3.651 ms plan:
192+
Query Text: SELECT count(*)
193+
FROM pg_class, pg_index
194+
WHERE oid = indrelid AND indisunique;
195+
Aggregate (cost=16.79..16.80 rows=1 width=0) (actual time=3.626..3.627 rows=1 loops=1)
196+
-> Hash Join (cost=4.17..16.55 rows=92 width=0) (actual time=3.349..3.594 rows=92 loops=1)
197+
Hash Cond: (pg_class.oid = pg_index.indrelid)
198+
-> Seq Scan on pg_class (cost=0.00..9.55 rows=255 width=4) (actual time=0.016..0.140 rows=255 loops=1)
199+
-> Hash (cost=3.02..3.02 rows=92 width=4) (actual time=3.238..3.238 rows=92 loops=1)
200+
Buckets: 1024 Batches: 1 Memory Usage: 4kB
201+
-> Seq Scan on pg_index (cost=0.00..3.02 rows=92 width=4) (actual time=0.008..3.187 rows=92 loops=1)
202+
Filter: indisunique
203+
]]></screen>
205204
</sect2>
206205

207206
<sect2>

doc/src/sgml/citext.sgml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/citext.sgml,v 1.4 2010/06/29 22:29:13 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/citext.sgml,v 1.4.2.1 2010/07/29 19:34:36 petere Exp $ -->
22

33
<sect1 id="citext">
44
<title>citext</title>
@@ -22,9 +22,9 @@
2222
in <productname>PostgreSQL</> has been to use the <function>lower</>
2323
function when comparing values, for example
2424

25-
<programlisting>
26-
SELECT * FROM tab WHERE lower(col) = LOWER(?);
27-
</programlisting>
25+
<programlisting>
26+
SELECT * FROM tab WHERE lower(col) = LOWER(?);
27+
</programlisting>
2828
</para>
2929

3030
<para>
@@ -74,20 +74,20 @@
7474
<para>
7575
Here's a simple example of usage:
7676

77-
<programlisting>
78-
CREATE TABLE users (
79-
nick CITEXT PRIMARY KEY,
80-
pass TEXT NOT NULL
81-
);
77+
<programlisting>
78+
CREATE TABLE users (
79+
nick CITEXT PRIMARY KEY,
80+
pass TEXT NOT NULL
81+
);
8282

83-
INSERT INTO users VALUES ( 'larry', md5(random()::text) );
84-
INSERT INTO users VALUES ( 'Tom', md5(random()::text) );
85-
INSERT INTO users VALUES ( 'Damian', md5(random()::text) );
86-
INSERT INTO users VALUES ( 'NEAL', md5(random()::text) );
87-
INSERT INTO users VALUES ( 'Bj&oslash;rn', md5(random()::text) );
83+
INSERT INTO users VALUES ( 'larry', md5(random()::text) );
84+
INSERT INTO users VALUES ( 'Tom', md5(random()::text) );
85+
INSERT INTO users VALUES ( 'Damian', md5(random()::text) );
86+
INSERT INTO users VALUES ( 'NEAL', md5(random()::text) );
87+
INSERT INTO users VALUES ( 'Bj&oslash;rn', md5(random()::text) );
8888

89-
SELECT * FROM users WHERE nick = 'Larry';
90-
</programlisting>
89+
SELECT * FROM users WHERE nick = 'Larry';
90+
</programlisting>
9191

9292
The <command>SELECT</> statement will return one tuple, even though
9393
the <structfield>nick</> column was set to <quote>larry</> and the query

doc/src/sgml/client-auth.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/client-auth.sgml,v 1.139 2010/06/29 22:29:13 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/client-auth.sgml,v 1.139.2.1 2010/07/29 19:34:36 petere Exp $ -->
22

33
<chapter id="client-authentication">
44
<title>Client Authentication</title>
@@ -1353,11 +1353,11 @@ omicron bryanh guest1
13531353
Since LDAP often uses commas and spaces to separate the different
13541354
parts of a DN, it is often necessary to use double-quoted parameter
13551355
values when configuring LDAP options, for example:
1356+
<programlisting>
1357+
ldapserver=ldap.example.net ldapprefix="cn=" ldapsuffix=", dc=example, dc=net"
1358+
</programlisting>
13561359
</para>
13571360
</note>
1358-
<synopsis>
1359-
ldapserver=ldap.example.net ldapprefix="cn=" ldapsuffix=", dc=example, dc=net"
1360-
</synopsis>
13611361

13621362
</sect2>
13631363

doc/src/sgml/config.sgml

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.294.2.2 2010/07/27 19:01:04 petere Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.294.2.3 2010/07/29 19:34:36 petere Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -5720,29 +5720,20 @@ plruby.use_strict = true # generates error: unknown class name
57205720
type a count of the number of granted locks and waiting locks is
57215721
also dumped as well as the totals. An example of the log file output
57225722
is shown here:
5723-
</para>
5724-
<para>
5725-
LOG: LockAcquire: new: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5726-
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5727-
wait(0) type(AccessShareLock)
5728-
</para>
5729-
<para>
5730-
LOG: GrantLock: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5731-
grantMask(2) req(1,0,0,0,0,0,0)=1 grant(1,0,0,0,0,0,0)=1
5732-
wait(0) type(AccessShareLock)
5733-
5734-
</para>
5735-
<para>
5736-
LOG: UnGrantLock: updated: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5737-
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5738-
wait(0) type(AccessShareLock)
5739-
</para>
5740-
<para>
5741-
LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5742-
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5743-
wait(0) type(INVALID)
5744-
</para>
5745-
<para>
5723+
<screen>
5724+
LOG: LockAcquire: new: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5725+
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5726+
wait(0) type(AccessShareLock)
5727+
LOG: GrantLock: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5728+
grantMask(2) req(1,0,0,0,0,0,0)=1 grant(1,0,0,0,0,0,0)=1
5729+
wait(0) type(AccessShareLock)
5730+
LOG: UnGrantLock: updated: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5731+
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5732+
wait(0) type(AccessShareLock)
5733+
LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5734+
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5735+
wait(0) type(INVALID)
5736+
</screen>
57465737
Details of the structure being dumped may be found in
57475738
src/include/storage/lock.h
57485739
</para>

doc/src/sgml/cube.sgml

Lines changed: 59 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/cube.sgml,v 1.7 2009/12/08 20:08:30 mha Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/cube.sgml,v 1.7.8.1 2010/07/29 19:34:36 petere Exp $ -->
22

33
<sect1 id="cube">
44
<title>cube</title>
@@ -98,47 +98,46 @@
9898
<para>
9999
The <filename>cube</> module includes a GiST index operator class for
100100
<type>cube</> values.
101-
The operators supported by the GiST opclass include:
101+
The operators supported by the GiST opclass are shown in <xref linkend="cube-gist-operators">.
102102
</para>
103103

104-
<itemizedlist>
105-
<listitem>
106-
<programlisting>
107-
a = b Same as
108-
</programlisting>
109-
<para>
110-
The cubes a and b are identical.
111-
</para>
112-
</listitem>
113-
<listitem>
114-
<programlisting>
115-
a &amp;&amp; b Overlaps
116-
</programlisting>
117-
<para>
118-
The cubes a and b overlap.
119-
</para>
120-
</listitem>
121-
<listitem>
122-
<programlisting>
123-
a @&gt; b Contains
124-
</programlisting>
125-
<para>
126-
The cube a contains the cube b.
127-
</para>
128-
</listitem>
129-
<listitem>
130-
<programlisting>
131-
a &lt;@ b Contained in
132-
</programlisting>
133-
<para>
134-
The cube a is contained in the cube b.
135-
</para>
136-
</listitem>
137-
</itemizedlist>
104+
<table id="cube-gist-operators">
105+
<title>Cube GiST operators</title>
106+
<tgroup cols="2">
107+
<thead>
108+
<row>
109+
<entry>Operator</entry>
110+
<entry>Description</entry>
111+
</row>
112+
</thead>
113+
114+
<tbody>
115+
<row>
116+
<entry><literal>a = b</></entry>
117+
<entry>The cubes a and b are identical.</entry>
118+
</row>
119+
120+
<row>
121+
<entry><literal>a &amp;&amp; b</></entry>
122+
<entry>The cubes a and b overlap.</entry>
123+
</row>
124+
125+
<row>
126+
<entry><literal>a @&gt; b</></entry>
127+
<entry>The cube a contains the cube b.</entry>
128+
</row>
129+
130+
<row>
131+
<entry><literal>a &lt;@ b</></entry>
132+
<entry>The cube a is contained in the cube b.</entry>
133+
</row>
134+
</tbody>
135+
</tgroup>
136+
</table>
138137

139138
<para>
140-
(Before PostgreSQL 8.2, the containment operators @&gt; and &lt;@ were
141-
respectively called @ and ~. These names are still available, but are
139+
(Before PostgreSQL 8.2, the containment operators <literal>@&gt;</> and <literal>&lt;@</> were
140+
respectively called <literal>@</> and <literal>~</>. These names are still available, but are
142141
deprecated and will eventually be retired. Notice that the old names
143142
are reversed from the convention formerly followed by the core geometric
144143
datatypes!)
@@ -147,10 +146,28 @@ a &lt;@ b Contained in
147146
<para>
148147
The standard B-tree operators are also provided, for example
149148

150-
<programlisting>
151-
[a, b] &lt; [c, d] Less than
152-
[a, b] &gt; [c, d] Greater than
153-
</programlisting>
149+
<informaltable>
150+
<tgroup cols="2">
151+
<thead>
152+
<row>
153+
<entry>Operator</entry>
154+
<entry>Description</entry>
155+
</row>
156+
</thead>
157+
158+
<tbody>
159+
<row>
160+
<entry><literal>[a, b] &lt; [c, d]</literal></entry>
161+
<entry>Less than</entry>
162+
</row>
163+
164+
<row>
165+
<entry><literal>[a, b] &gt; [c, d]</literal></entry>
166+
<entry>Greater than</entry>
167+
</row>
168+
</tbody>
169+
</tgroup>
170+
</informaltable>
154171

155172
These operators do not make a lot of sense for any practical
156173
purpose but sorting. These operators first compare (a) to (c),

doc/src/sgml/datatype.sgml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.250.2.3 2010/07/27 19:01:04 petere Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.250.2.4 2010/07/29 19:34:36 petere Exp $ -->
22

33
<chapter id="datatype">
44
<title>Data Types</title>
@@ -1576,21 +1576,21 @@ SELECT E'\\xDEADBEEF';
15761576
<para>
15771577
The <type>interval</type> type has an additional option, which is
15781578
to restrict the set of stored fields by writing one of these phrases:
1579-
<programlisting>
1580-
YEAR
1581-
MONTH
1582-
DAY
1583-
HOUR
1584-
MINUTE
1585-
SECOND
1586-
YEAR TO MONTH
1587-
DAY TO HOUR
1588-
DAY TO MINUTE
1589-
DAY TO SECOND
1590-
HOUR TO MINUTE
1591-
HOUR TO SECOND
1592-
MINUTE TO SECOND
1593-
</programlisting>
1579+
<literallayout class="monospaced">
1580+
YEAR
1581+
MONTH
1582+
DAY
1583+
HOUR
1584+
MINUTE
1585+
SECOND
1586+
YEAR TO MONTH
1587+
DAY TO HOUR
1588+
DAY TO MINUTE
1589+
DAY TO SECOND
1590+
HOUR TO MINUTE
1591+
HOUR TO SECOND
1592+
MINUTE TO SECOND
1593+
</literallayout>
15941594
Note that if both <replaceable>fields</replaceable> and
15951595
<replaceable>p</replaceable> are specified, the
15961596
<replaceable>fields</replaceable> must include <literal>SECOND</>,
@@ -3803,7 +3803,7 @@ SELECT to_tsvector('english', 'The Fat Rats');
38033803
of the operators:
38043804

38053805
<programlisting>
3806-
SELECT 'fat &amp; rat'::tsquery;
3806+
SELECT 'fat &amp; rat'::tsquery;
38073807
tsquery
38083808
---------------
38093809
'fat' &amp; 'rat'

0 commit comments

Comments
 (0)