Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 66424a2

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 984d56b commit 66424a2

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

+26-27
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.9 2010/07/29 19:34:40 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

+16-16
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.5 2010/07/29 19:34:40 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

+4-4
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.140 2010/07/29 19:34:40 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

+15-24
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.301 2010/07/27 19:01:16 petere Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.302 2010/07/29 19:34:40 petere Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -5808,29 +5808,20 @@ plruby.use_strict = true # generates error: unknown class name
58085808
type a count of the number of granted locks and waiting locks is
58095809
also dumped as well as the totals. An example of the log file output
58105810
is shown here:
5811-
</para>
5812-
<para>
5813-
LOG: LockAcquire: new: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5814-
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5815-
wait(0) type(AccessShareLock)
5816-
</para>
5817-
<para>
5818-
LOG: GrantLock: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5819-
grantMask(2) req(1,0,0,0,0,0,0)=1 grant(1,0,0,0,0,0,0)=1
5820-
wait(0) type(AccessShareLock)
5821-
5822-
</para>
5823-
<para>
5824-
LOG: UnGrantLock: updated: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5825-
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5826-
wait(0) type(AccessShareLock)
5827-
</para>
5828-
<para>
5829-
LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5830-
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5831-
wait(0) type(INVALID)
5832-
</para>
5833-
<para>
5811+
<screen>
5812+
LOG: LockAcquire: new: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5813+
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5814+
wait(0) type(AccessShareLock)
5815+
LOG: GrantLock: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5816+
grantMask(2) req(1,0,0,0,0,0,0)=1 grant(1,0,0,0,0,0,0)=1
5817+
wait(0) type(AccessShareLock)
5818+
LOG: UnGrantLock: updated: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5819+
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5820+
wait(0) type(AccessShareLock)
5821+
LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5822+
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5823+
wait(0) type(INVALID)
5824+
</screen>
58345825
Details of the structure being dumped may be found in
58355826
src/include/storage/lock.h
58365827
</para>

doc/src/sgml/cube.sgml

+59-42
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.8 2010/07/29 19:34:40 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

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.254 2010/07/27 19:01:16 petere Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.255 2010/07/29 19:34:40 petere Exp $ -->
22

33
<chapter id="datatype">
44
<title>Data Types</title>
@@ -1584,21 +1584,21 @@ SELECT E'\\xDEADBEEF';
15841584
<para>
15851585
The <type>interval</type> type has an additional option, which is
15861586
to restrict the set of stored fields by writing one of these phrases:
1587-
<programlisting>
1588-
YEAR
1589-
MONTH
1590-
DAY
1591-
HOUR
1592-
MINUTE
1593-
SECOND
1594-
YEAR TO MONTH
1595-
DAY TO HOUR
1596-
DAY TO MINUTE
1597-
DAY TO SECOND
1598-
HOUR TO MINUTE
1599-
HOUR TO SECOND
1600-
MINUTE TO SECOND
1601-
</programlisting>
1587+
<literallayout class="monospaced">
1588+
YEAR
1589+
MONTH
1590+
DAY
1591+
HOUR
1592+
MINUTE
1593+
SECOND
1594+
YEAR TO MONTH
1595+
DAY TO HOUR
1596+
DAY TO MINUTE
1597+
DAY TO SECOND
1598+
HOUR TO MINUTE
1599+
HOUR TO SECOND
1600+
MINUTE TO SECOND
1601+
</literallayout>
16021602
Note that if both <replaceable>fields</replaceable> and
16031603
<replaceable>p</replaceable> are specified, the
16041604
<replaceable>fields</replaceable> must include <literal>SECOND</>,
@@ -3811,7 +3811,7 @@ SELECT to_tsvector('english', 'The Fat Rats');
38113811
of the operators:
38123812

38133813
<programlisting>
3814-
SELECT 'fat &amp; rat'::tsquery;
3814+
SELECT 'fat &amp; rat'::tsquery;
38153815
tsquery
38163816
---------------
38173817
'fat' &amp; 'rat'

0 commit comments

Comments
 (0)