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

Commit 443dd97

Browse files
committed
doc: Fix spacing in verbatim environments
1 parent f64fe2c commit 443dd97

File tree

7 files changed

+96
-95
lines changed

7 files changed

+96
-95
lines changed

doc/src/sgml/config.sgml

+21-21
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ include 'filename'
238238
The <filename>postgresql.conf</> file can also contain
239239
<literal>include_dir</literal> directives, which specify an entire directory
240240
of configuration files to include. It is used similarly:
241-
<programlisting>
242-
include_dir 'directory'
243-
</programlisting>
241+
<programlisting>
242+
include_dir 'directory'
243+
</programlisting>
244244
Non-absolute directory names follow the same rules as single file include
245245
directives: they are relative to the directory containing the referencing
246246
configuration file. Within that directory, only non-directory files whose
@@ -263,11 +263,11 @@ include 'filename'
263263
situation is to break the custom configuration changes for your site into
264264
three files. You could add this to the end of your
265265
<filename>postgresql.conf</> file to include them:
266-
<programlisting>
267-
include 'shared.conf'
268-
include 'memory.conf'
269-
include 'server.conf'
270-
</programlisting>
266+
<programlisting>
267+
include 'shared.conf'
268+
include 'memory.conf'
269+
include 'server.conf'
270+
</programlisting>
271271
All systems would have the same <filename>shared.conf</>. Each server
272272
with a particular amount of memory could share the same
273273
<filename>memory.conf</>; you might have one for all servers with 8GB of RAM,
@@ -279,15 +279,15 @@ include 'filename'
279279
Another possibility is to create a configuration file directory and
280280
put this information into files there. For example, a <filename>conf.d</>
281281
directory could be referenced at the end of<filename>postgresql.conf</>:
282-
<screen>
283-
include_dir 'conf.d'
284-
</screen>
282+
<programlisting>
283+
include_dir 'conf.d'
284+
</programlisting>
285285
Then you could name the files in the <filename>conf.d</> directory like this:
286-
<screen>
287-
00shared.conf
288-
01memory.conf
289-
02server.conf
290-
</screen>
286+
<programlisting>
287+
00shared.conf
288+
01memory.conf
289+
02server.conf
290+
</programlisting>
291291
This shows a clear order in which these files will be loaded. This is
292292
important because only the last setting encountered when the server is
293293
reading its configuration will be used. Something set in
@@ -298,11 +298,11 @@ include 'filename'
298298
<para>
299299
You might instead use this configuration directory approach while naming
300300
these files more descriptively:
301-
<screen>
302-
00shared.conf
303-
01memory-8GB.conf
304-
02server-foo.conf
305-
</screen>
301+
<programlisting>
302+
00shared.conf
303+
01memory-8GB.conf
304+
02server-foo.conf
305+
</programlisting>
306306
This sort of arrangement gives a unique name for each configuration file
307307
variation. This can help eliminate ambiguity when several servers have
308308
their configurations all stored in one place, such as in a version

doc/src/sgml/extend.sgml

+10-10
Original file line numberDiff line numberDiff line change
@@ -1167,12 +1167,12 @@ include $(PGXS)
11671167
This procedure is also called a
11681168
<indexterm><primary>VPATH</primary></indexterm><firstterm>VPATH</firstterm>
11691169
build. Here's how:
1170-
<screen>
1171-
<userinput>mkdir build_dir</userinput>
1172-
<userinput>cd build_dir</userinput>
1173-
<userinput>make -f /path/to/extension/source/tree/Makefile</userinput>
1174-
<userinput>make -f /path/to/extension/source/tree/Makefile install</userinput>
1175-
</screen>
1170+
<programlisting>
1171+
mkdir build_dir
1172+
cd build_dir
1173+
make -f /path/to/extension/source/tree/Makefile
1174+
make -f /path/to/extension/source/tree/Makefile install
1175+
</programlisting>
11761176
</para>
11771177

11781178
<para>
@@ -1181,10 +1181,10 @@ include $(PGXS)
11811181
core script <filename>config/prep_buildtree</>. Once this has been done
11821182
you can build by setting the <literal>make</literal> variable
11831183
<varname>USE_VPATH</varname> like this:
1184-
<screen>
1185-
<userinput>make USE_VPATH=/path/to/extension/source/tree</userinput>
1186-
<userinput>make USE_VPATH=/path/to/extension/source/tree install</userinput>
1187-
</screen>
1184+
<programlisting>
1185+
make USE_VPATH=/path/to/extension/source/tree
1186+
make USE_VPATH=/path/to/extension/source/tree install
1187+
</programlisting>
11881188
This procedure can work with a greater variety of directory layouts.
11891189
</para>
11901190

doc/src/sgml/func.sgml

+5-5
Original file line numberDiff line numberDiff line change
@@ -10495,7 +10495,7 @@ table2-mapping
1049510495
-----+-------
1049610496
a | "foo"
1049710497
b | "bar"
10498-
</programlisting>
10498+
</programlisting>
1049910499
</entry>
1050010500
</row>
1050110501
<row>
@@ -10514,7 +10514,7 @@ table2-mapping
1051410514
-----+-------
1051510515
a | foo
1051610516
b | bar
10517-
</programlisting>
10517+
</programlisting>
1051810518
</entry>
1051910519
</row>
1052010520
<row>
@@ -10598,7 +10598,7 @@ table2-mapping
1059810598
---+---
1059910599
1 | 2
1060010600
3 | 4
10601-
</programlisting>
10601+
</programlisting>
1060210602
</entry>
1060310603
</row>
1060410604
<row>
@@ -10671,7 +10671,7 @@ table2-mapping
1067110671
a | b | d
1067210672
---+---------+---
1067310673
1 | [1,2,3] |
10674-
</programlisting>
10674+
</programlisting>
1067510675
</entry>
1067610676
</row>
1067710677
<row>
@@ -10692,7 +10692,7 @@ table2-mapping
1069210692
---+-----
1069310693
1 | foo
1069410694
2 |
10695-
</programlisting>
10695+
</programlisting>
1069610696
</entry>
1069710697
</row>
1069810698
</tbody>

doc/src/sgml/json.sgml

+32-32
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
</para>
164164
<para>
165165
The following are all valid <type>json</> (or <type>jsonb</>) expressions:
166-
<programlisting>
166+
<programlisting>
167167
-- Simple scalar/primitive value
168168
-- Primitive values can be numbers, quoted strings, true, false, or null
169169
SELECT '5'::json;
@@ -177,7 +177,7 @@ SELECT '{"bar": "baz", "balance": 7.77, "active": false}'::json;
177177

178178
-- Arrays and objects can be nested arbitrarily
179179
SELECT '{"foo": [true, "bar"], "tags": {"a": 1, "b": null}}'::json;
180-
</programlisting>
180+
</programlisting>
181181
</para>
182182

183183
<para>
@@ -262,7 +262,7 @@ SELECT '{"reading": 1.230e-5}'::json, '{"reading": 1.230e-5}'::jsonb;
262262
one <type>jsonb</> document has contained within it another one.
263263
These examples return true except as noted:
264264
</para>
265-
<programlisting>
265+
<programlisting>
266266
-- Simple scalar/primitive values contain only the identical value:
267267
SELECT '"foo"'::jsonb @> '"foo"'::jsonb;
268268

@@ -282,7 +282,7 @@ SELECT '[1, 2, [1, 3]]'::jsonb @> '[[1, 3]]'::jsonb;
282282

283283
-- Similarly, containment is not reported here:
284284
SELECT '{"foo": {"bar": "baz"}}'::jsonb @> '{"bar": "baz"}'::jsonb; -- yields false
285-
</programlisting>
285+
</programlisting>
286286

287287
<para>
288288
The general principle is that the contained object must match the
@@ -296,13 +296,13 @@ SELECT '{"foo": {"bar": "baz"}}'::jsonb @> '{"bar": "baz"}'::jsonb; -- yields f
296296
As a special exception to the general principle that the structures
297297
must match, an array may contain a primitive value:
298298
</para>
299-
<programlisting>
299+
<programlisting>
300300
-- This array contains the primitive string value:
301301
SELECT '["foo", "bar"]'::jsonb @> '"bar"'::jsonb;
302302

303303
-- This exception is not reciprocal -- non-containment is reported here:
304304
SELECT '"bar"'::jsonb @> '["bar"]'::jsonb; -- yields false
305-
</programlisting>
305+
</programlisting>
306306

307307
<para>
308308
<type>jsonb</> also has an <firstterm>existence</> operator, which is
@@ -363,22 +363,22 @@ SELECT '"foo"'::jsonb ? 'foo';
363363
(For details of the semantics that these operators
364364
implement, see <xref linkend="functions-jsonb-op-table">.)
365365
An example of creating an index with this operator class is:
366-
<programlisting>
366+
<programlisting>
367367
CREATE INDEX idxgin ON api USING gin (jdoc);
368-
</programlisting>
368+
</programlisting>
369369
The non-default GIN operator class <literal>jsonb_path_ops</>
370370
supports indexing the <literal>@&gt;</> operator only.
371371
An example of creating an index with this operator class is:
372-
<programlisting>
372+
<programlisting>
373373
CREATE INDEX idxginp ON api USING gin (jdoc jsonb_path_ops);
374-
</programlisting>
374+
</programlisting>
375375
</para>
376376

377377
<para>
378378
Consider the example of a table that stores JSON documents
379379
retrieved from a third-party web service, with a documented schema
380380
definition. A typical document is:
381-
<programlisting>
381+
<programlisting>
382382
{
383383
"guid": "9c36adc1-7fb5-4d5b-83b4-90356a46061a",
384384
"name": "Angela Barton",
@@ -394,32 +394,32 @@ CREATE INDEX idxginp ON api USING gin (jdoc jsonb_path_ops);
394394
"qui"
395395
]
396396
}
397-
</programlisting>
397+
</programlisting>
398398
We store these documents in a table named <structname>api</>,
399399
in a <type>jsonb</> column named <structfield>jdoc</>.
400400
If a GIN index is created on this column,
401401
queries like the following can make use of the index:
402-
<programlisting>
402+
<programlisting>
403403
-- Find documents in which the key "company" has value "Magnafone"
404404
SELECT jdoc-&gt;'guid', jdoc-&gt;'name' FROM api WHERE jdoc @&gt; '{"company": "Magnafone"}';
405-
</programlisting>
405+
</programlisting>
406406
However, the index could not be used for queries like the
407407
following, because though the operator <literal>?</> is indexable,
408408
it is not applied directly to the indexed column <structfield>jdoc</>:
409-
<programlisting>
409+
<programlisting>
410410
-- Find documents in which the key "tags" contains key or array element "qui"
411411
SELECT jdoc-&gt;'guid', jdoc-&gt;'name' FROM api WHERE jdoc -&gt; 'tags' ? 'qui';
412-
</programlisting>
412+
</programlisting>
413413
Still, with appropriate use of expression indexes, the above
414414
query can use an index. If querying for particular items within
415415
the <literal>"tags"</> key is common, defining an index like this
416416
may be worthwhile:
417-
<programlisting>
417+
<programlisting>
418418
-- Note that the "jsonb -&gt; text" operator can only be called on a JSON
419419
-- object, so as a consequence of creating this index the root of each
420420
-- "jdoc" value must be an object. This is enforced during insertion.
421421
CREATE INDEX idxgintags ON api USING gin ((jdoc -&gt; 'tags'));
422-
</programlisting>
422+
</programlisting>
423423
Now, the <literal>WHERE</> clause <literal>jdoc -&gt; 'tags' ? 'qui'</>
424424
will be recognized as an application of the indexable
425425
operator <literal>?</> to the indexed
@@ -429,10 +429,10 @@ CREATE INDEX idxgintags ON api USING gin ((jdoc -&gt; 'tags'));
429429
</para>
430430
<para>
431431
Another approach to querying is to exploit containment, for example:
432-
<programlisting>
432+
<programlisting>
433433
-- Find documents in which the key "tags" contains array element "qui"
434434
SELECT jdoc-&gt;'guid', jdoc-&gt;'name' FROM api WHERE jdoc @&gt; '{"tags": ["qui"]}';
435-
</programlisting>
435+
</programlisting>
436436
A simple GIN index on the <structfield>jdoc</> column can support this
437437
query. But note that such an index will store copies of every key and
438438
value in the <structfield>jdoc</> column, whereas the expression index
@@ -460,7 +460,7 @@ SELECT jdoc-&gt;'guid', jdoc-&gt;'name' FROM api WHERE jdoc @&gt; '{"tags": ["qu
460460
and a <literal>jsonb_path_ops</literal> GIN index is that the former
461461
creates independent index items for each key and value in the data,
462462
while the latter creates index items only for each value in the
463-
data.
463+
data.
464464
<footnote>
465465
<para>
466466
For this purpose, the term <quote>value</> includes array elements,
@@ -501,17 +501,17 @@ SELECT jdoc-&gt;'guid', jdoc-&gt;'name' FROM api WHERE jdoc @&gt; '{"tags": ["qu
501501
equality of complete JSON documents.
502502
The <literal>btree</> ordering for <type>jsonb</> datums is seldom
503503
of great interest, but for completeness it is:
504-
<synopsis>
505-
<replaceable>Object</replaceable> > <replaceable>Array</replaceable> > <replaceable>Boolean</replaceable> > <replaceable>Number</replaceable> > <replaceable>String</replaceable> > <replaceable>Null</replaceable>
504+
<synopsis>
505+
<replaceable>Object</replaceable> > <replaceable>Array</replaceable> > <replaceable>Boolean</replaceable> > <replaceable>Number</replaceable> > <replaceable>String</replaceable> > <replaceable>Null</replaceable>
506506

507-
<replaceable>Object with n pairs</replaceable> > <replaceable>object with n - 1 pairs</replaceable>
507+
<replaceable>Object with n pairs</replaceable> > <replaceable>object with n - 1 pairs</replaceable>
508508

509-
<replaceable>Array with n elements</replaceable> > <replaceable>array with n - 1 elements</replaceable>
510-
</synopsis>
509+
<replaceable>Array with n elements</replaceable> > <replaceable>array with n - 1 elements</replaceable>
510+
</synopsis>
511511
Objects with equal numbers of pairs are compared in the order:
512-
<synopsis>
513-
<replaceable>key-1</replaceable>, <replaceable>value-1</replaceable>, <replaceable>key-2</replaceable> ...
514-
</synopsis>
512+
<synopsis>
513+
<replaceable>key-1</replaceable>, <replaceable>value-1</replaceable>, <replaceable>key-2</replaceable> ...
514+
</synopsis>
515515
Note that object keys are compared in their storage order;
516516
in particular, since shorter keys are stored before longer keys, this
517517
can lead to results that might be unintuitive, such as:
@@ -520,9 +520,9 @@ SELECT jdoc-&gt;'guid', jdoc-&gt;'name' FROM api WHERE jdoc @&gt; '{"tags": ["qu
520520
</programlisting>
521521
Similarly, arrays with equal numbers of elements are compared in the
522522
order:
523-
<synopsis>
524-
<replaceable>element-1</replaceable>, <replaceable>element-2</replaceable> ...
525-
</synopsis>
523+
<synopsis>
524+
<replaceable>element-1</replaceable>, <replaceable>element-2</replaceable> ...
525+
</synopsis>
526526
Primitive JSON values are compared using the same
527527
comparison rules as for the underlying
528528
<productname>PostgreSQL</productname> data type. Strings are

0 commit comments

Comments
 (0)