Skip to content

Commit 1d27de4

Browse files
committed
Random copy-editing.
1 parent c119c55 commit 1d27de4

21 files changed

+571
-588
lines changed

doc/src/sgml/array.sgml

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.32 2003/11/01 01:56:28 petere Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.33 2003/11/04 09:55:38 petere Exp $ -->
22

33
<sect1 id="arrays">
44
<title>Arrays</title>
@@ -76,13 +76,45 @@ CREATE TABLE tictactoe (
7676
<sect2>
7777
<title>Array Value Input</title>
7878

79-
<para>
80-
Now we can show some <command>INSERT</command> statements. To write an array
81-
value as a literal constant, we enclose the element values within curly
82-
braces and separate them by commas. (If you know C, this is not unlike the
83-
C syntax for initializing structures.) We may put double quotes around any
84-
element value, and must do so if it contains commas or curly braces.
85-
(More details appear below.)
79+
<indexterm>
80+
<primary>array</primary>
81+
<secondary>constant</secondary>
82+
</indexterm>
83+
84+
<para>
85+
To write an array value as a literal constant, enclose the element
86+
values within curly braces and separate them by commas. (If you
87+
know C, this is not unlike the C syntax for initializing
88+
structures.) You may put double quotes around any element value,
89+
and must do so if it contains commas or curly braces. (More
90+
details appear below.) Thus, the general format of an array
91+
constant is the following:
92+
<synopsis>
93+
'{ <replaceable>val1</replaceable> <replaceable>delim</replaceable> <replaceable>val2</replaceable> <replaceable>delim</replaceable> ... }'
94+
</synopsis>
95+
where <replaceable>delim</replaceable> is the delimiter character
96+
for the type, as recorded in its <literal>pg_type</literal> entry.
97+
(For all built-in types, this is the comma character
98+
<quote><literal>,</literal></>.) Each
99+
<replaceable>val</replaceable> is either a constant of the array
100+
element type, or a subarray. An example of an array constant is
101+
<programlisting>
102+
'{{1,2,3},{4,5,6},{7,8,9}}'
103+
</programlisting>
104+
This constant is a two-dimensional, 3-by-3 array consisting of
105+
three subarrays of integers.
106+
</para>
107+
108+
<para>
109+
(These kinds of array constants are actually only a special case of
110+
the generic type constants discussed in <xref
111+
linkend="sql-syntax-constants-generic">. The constant is initially
112+
treated as a string and passed to the array input conversion
113+
routine. An explicit type specification might be necessary.)
114+
</para>
115+
116+
<para>
117+
Now we can show some <command>INSERT</command> statements.
86118

87119
<programlisting>
88120
INSERT INTO sal_emp
@@ -95,14 +127,15 @@ INSERT INTO sal_emp
95127
'{20000, 25000, 25000, 25000}',
96128
'{{"talk", "consult"}, {"meeting"}}');
97129
</programlisting>
98-
</para>
130+
</para>
131+
132+
<para>
133+
A limitation of the present array implementation is that individual
134+
elements of an array cannot be SQL null values. The entire array
135+
can be set to null, but you can't have an array with some elements
136+
null and some not.
137+
</para>
99138

100-
<para>
101-
A limitation of the present array implementation is that individual
102-
elements of an array cannot be SQL null values. The entire array can be set
103-
to null, but you can't have an array with some elements null and some
104-
not.
105-
</para>
106139
<para>
107140
This can lead to surprising results. For example, the result of the
108141
previous two inserts looks like this:

doc/src/sgml/backup.sgml

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.30 2003/08/31 17:32:18 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.31 2003/11/04 09:55:38 petere Exp $
33
-->
44
<chapter id="backup">
55
<title>Backup and Restore</title>
@@ -155,8 +155,9 @@ pg_dump -h <replaceable>host1</> <replaceable>dbname</> | psql -h <replaceable>h
155155

156156
<tip>
157157
<para>
158-
Restore performance can be improved by increasing <literal>SORT_MEM</>
159-
(see <xref linkend="runtime-config-resource-memory">).
158+
Restore performance can be improved by increasing the
159+
configuration parameter <varname>sort_mem</varname> (see <xref
160+
linkend="runtime-config-resource-memory">).
160161
</para>
161162
</tip>
162163
</sect2>
@@ -333,12 +334,9 @@ tar -cf backup.tar /usr/local/pgsql/data
333334
going on. For this reason it is also not advisable to trust file
334335
systems that claim to support <quote>consistent
335336
snapshots</quote>. Information about stopping the server can be
336-
found in <xref linkend="postmaster-shutdown">.
337-
</para>
338-
339-
<para>
340-
Needless to say that you also need to shut down the server
341-
before restoring the data.
337+
found in <xref linkend="postmaster-shutdown">. Needless to say
338+
that you also need to shut down the server before restoring the
339+
data.
342340
</para>
343341
</listitem>
344342

@@ -362,7 +360,18 @@ tar -cf backup.tar /usr/local/pgsql/data
362360
</para>
363361

364362
<para>
365-
Also note that the file system backup will not necessarily be
363+
An alternative file-system backup approach is to make a
364+
<quote>consistent snapshot</quote> of the data directory, if the
365+
file system supports that functionality. Such a snapshot will save
366+
the database files in a state where the database server was not
367+
properly shut down; therefore, when you start the database server
368+
on this backed up directory, it will think the server had crashed
369+
and replay the WAL log. This is not a problem, just be aware of
370+
it.
371+
</para>
372+
373+
<para>
374+
Note that the file system backup will not necessarily be
366375
smaller than an SQL dump. On the contrary, it will most likely be
367376
larger. (<application>pg_dump</application> does not need to dump
368377
the contents of indexes for example, just the commands to recreate
@@ -372,7 +381,7 @@ tar -cf backup.tar /usr/local/pgsql/data
372381
</sect1>
373382

374383
<sect1 id="migration">
375-
<title>Migration between releases</title>
384+
<title>Migration Between Releases</title>
376385

377386
<indexterm zone="migration">
378387
<primary>upgrading</primary>
@@ -385,17 +394,20 @@ tar -cf backup.tar /usr/local/pgsql/data
385394

386395
<para>
387396
As a general rule, the internal data storage format is subject to
388-
change between releases of <productname>PostgreSQL</>. This does not
389-
apply to different <quote>patch levels</quote>, these always have
390-
compatible storage formats. For example, releases 7.0.1, 7.1.2, and
391-
7.2 are not compatible, whereas 7.1.1 and 7.1.2 are. When you
392-
update between compatible versions, then you can simply reuse the
393-
data area in disk by the new executables. Otherwise you need to
397+
change between major releases of <productname>PostgreSQL</> (where
398+
the number after the first dot changes). This does not apply to
399+
different minor releases under the same major release (where the
400+
number of the second dot changes); these always have compatible
401+
storage formats. For example, releases 7.0.1, 7.1.2, and 7.2 are
402+
not compatible, whereas 7.1.1 and 7.1.2 are. When you update
403+
between compatible versions, then you can simply reuse the data
404+
area in disk by the new executables. Otherwise you need to
394405
<quote>back up</> your data and <quote>restore</> it on the new
395406
server, using <application>pg_dump</>. (There are checks in place
396407
that prevent you from doing the wrong thing, so no harm can be done
397408
by confusing these things.) The precise installation procedure is
398-
not subject of this section; these details are in <xref linkend="installation">.
409+
not subject of this section; these details are in <xref
410+
linkend="installation">.
399411
</para>
400412

401413
<para>

doc/src/sgml/charset.sgml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.39 2003/09/11 18:30:38 momjian Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.40 2003/11/04 09:55:38 petere Exp $ -->
22

33
<chapter id="charset">
44
<title>Localization</>
@@ -248,12 +248,9 @@ initdb --locale=sv_SE
248248
<para>
249249
Client applications that handle server-side errors by parsing the
250250
text of the error message will obviously have problems when the
251-
server's messages are in a different language. If you create such
252-
an application you need to devise a plan to cope with this
253-
situation. The embedded SQL interface (<application>ECPG</>) is
254-
also affected by this problem. It is currently recommended that
255-
servers interfacing with <application>ECPG</> applications be
256-
configured to send messages in English.
251+
server's messages are in a different language. Authors of such
252+
applications are advised to make use of the error code scheme
253+
instead.
257254
</para>
258255

259256
<para>
@@ -430,7 +427,7 @@ initdb --locale=sv_SE
430427
mistakenly meant ISO 8859-5. From 7.2 on, <literal>LATIN5</>
431428
means ISO 8859-9. If you have a <literal>LATIN5</> database
432429
created on 7.1 or earlier and want to migrate to 7.2 or later,
433-
you should be very careful about this change.
430+
you should be careful about this change.
434431
</para>
435432
</important>
436433

doc/src/sgml/client-auth.sgml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.59 2003/09/13 16:43:38 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.60 2003/11/04 09:55:38 petere Exp $
33
-->
44

55
<chapter id="client-authentication">
@@ -85,13 +85,13 @@ $Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.59 2003/09/13 16:43:38
8585
<para>
8686
A record may have one of the seven formats
8787
<synopsis>
88-
local <replaceable>database</replaceable> <replaceable>user</replaceable> <replaceable>authentication-method</replaceable> <optional><replaceable>authentication-option</replaceable></optional>
89-
host <replaceable>database</replaceable> <replaceable>user</replaceable> <replaceable>IP-address</replaceable> <replaceable>IP-mask</replaceable> <replaceable>authentication-method</replaceable> <optional><replaceable>authentication-option</replaceable></optional>
90-
hostssl <replaceable>database</replaceable> <replaceable>user</replaceable> <replaceable>IP-address</replaceable> <replaceable>IP-mask</replaceable> <replaceable>authentication-method</replaceable> <optional><replaceable>authentication-option</replaceable></optional>
88+
local <replaceable>database</replaceable> <replaceable>user</replaceable> <replaceable>authentication-method</replaceable> <optional><replaceable>authentication-option</replaceable></optional>
89+
host <replaceable>database</replaceable> <replaceable>user</replaceable> <replaceable>IP-address</replaceable> <replaceable>IP-mask</replaceable> <replaceable>authentication-method</replaceable> <optional><replaceable>authentication-option</replaceable></optional>
90+
hostssl <replaceable>database</replaceable> <replaceable>user</replaceable> <replaceable>IP-address</replaceable> <replaceable>IP-mask</replaceable> <replaceable>authentication-method</replaceable> <optional><replaceable>authentication-option</replaceable></optional>
9191
hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> <replaceable>IP-address</replaceable> <replaceable>IP-mask</replaceable> <replaceable>authentication-method</replaceable> <optional><replaceable>authentication-option</replaceable></optional>
92-
host <replaceable>database</replaceable> <replaceable>user</replaceable> <replaceable>IP-address</replaceable>/<replaceable>CIDR-mask</replaceable> <replaceable>authentication-method</replaceable> <optional><replaceable>authentication-option</replaceable></optional>
93-
hostssl <replaceable>database</replaceable> <replaceable>user</replaceable> <replaceable>IP-address</replaceable>/<replaceable>CIDR-mask</replaceable> <replaceable>authentication-method</replaceable> <optional><replaceable>authentication-option</replaceable></optional>
94-
hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> <replaceable>IP-address</replaceable>/<replaceable>CIDR-mask</replaceable> <replaceable>authentication-method</replaceable> <optional><replaceable>authentication-option</replaceable></optional>
92+
host <replaceable>database</replaceable> <replaceable>user</replaceable> <replaceable>IP-address</replaceable>/<replaceable>IP-masklen</replaceable> <replaceable>authentication-method</replaceable> <optional><replaceable>authentication-option</replaceable></optional>
93+
hostssl <replaceable>database</replaceable> <replaceable>user</replaceable> <replaceable>IP-address</replaceable>/<replaceable>IP-masklen</replaceable> <replaceable>authentication-method</replaceable> <optional><replaceable>authentication-option</replaceable></optional>
94+
hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable> <replaceable>IP-address</replaceable>/<replaceable>IP-masklen</replaceable> <replaceable>authentication-method</replaceable> <optional><replaceable>authentication-option</replaceable></optional>
9595
</synopsis>
9696
The meaning of the fields is as follows:
9797

@@ -220,25 +220,26 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable>
220220
</varlistentry>
221221

222222
<varlistentry>
223-
<term><replaceable>CIDR-mask</replaceable></term>
223+
<term><replaceable>IP-masklen</replaceable></term>
224224
<listitem>
225225
<para>
226-
This field may be used as an alternative to the
227-
<replaceable>IP-mask</replaceable> notation. It is an
228-
integer specifying the number of high-order bits
229-
to set in the mask. The number must
230-
be between 0 and 32 (in the case of an IPv4 address) or 128
231-
(in the case of an IPv6 address) inclusive. 0 will match any
232-
address, while 32/128 will match only the exact host specified.
233-
The same matching logic is used as for a dotted notation
234-
<replaceable>IP-Mask</replaceable>.
226+
This field may be used as an alternative to the
227+
<replaceable>IP-mask</replaceable> notation. It is an integer
228+
specifying the number of high-order bits to set in the mask.
229+
The number must be between 0 and 32 (in the case of an IPv4
230+
address) or 128 (in the case of an IPv6 address) inclusive. 0
231+
will match any address, while 32 (or 128, respectively) will
232+
match only the exact host specified. The same matching logic
233+
is used as for a dotted notation
234+
<replaceable>IP-mask</replaceable>.
235235
</para>
236236

237237
<para>
238-
There must be no white space between the <replaceable>IP-address</replaceable>
239-
and the <literal>/</literal> or the <literal>/</literal> and the
240-
<replaceable>CIDR-mask</replaceable>, or the file will not be parsed
241-
correctly.
238+
There must be no white space between the
239+
<replaceable>IP-address</replaceable> and the
240+
<literal>/</literal> or the <literal>/</literal> and the
241+
<replaceable>IP-masklen</replaceable>, or the file will not be
242+
parsed correctly.
242243
</para>
243244

244245
<para>

doc/src/sgml/datatype.sgml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.128 2003/11/01 01:56:29 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.129 2003/11/04 09:55:38 petere Exp $
33
-->
44

55
<chapter id="datatype">
@@ -917,10 +917,10 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
917917

918918
<para>
919919
In addition, <productname>PostgreSQL</productname> provides the
920-
<type>text</type> type, which stores strings of any
921-
length. Although the type <type>text</type> is not in the
922-
<acronym>SQL</acronym> standard, several other SQL database products
923-
have it as well.
920+
<type>text</type> type, which stores strings of any length.
921+
Although the type <type>text</type> is not in the
922+
<acronym>SQL</acronym> standard, several other SQL database
923+
management systems have it as well.
924924
</para>
925925

926926
<para>
@@ -1464,7 +1464,7 @@ SELECT b, char_length(b) FROM test2;
14641464
</row>
14651465
<row>
14661466
<entry>1999-01-08</entry>
1467-
<entry>ISO-8601, January 8 in any mode
1467+
<entry>ISO 8601, January 8 in any mode
14681468
(recommended format)</entry>
14691469
</row>
14701470
<row>
@@ -1486,11 +1486,11 @@ SELECT b, char_length(b) FROM test2;
14861486
</row>
14871487
<row>
14881488
<entry>19990108</entry>
1489-
<entry>ISO-8601; January 8, 1999 in any mode</entry>
1489+
<entry>ISO 8601; January 8, 1999 in any mode</entry>
14901490
</row>
14911491
<row>
14921492
<entry>990108</entry>
1493-
<entry>ISO-8601; January 8, 1999 in any mode</entry>
1493+
<entry>ISO 8601; January 8, 1999 in any mode</entry>
14941494
</row>
14951495
<row>
14961496
<entry>1999.008</entry>

doc/src/sgml/ddl.sgml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ddl.sgml,v 1.21 2003/11/01 01:56:29 petere Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ddl.sgml,v 1.22 2003/11/04 09:55:38 petere Exp $ -->
22

33
<chapter id="ddl">
44
<title>Data Definition</title>
@@ -318,12 +318,12 @@ DROP TABLE products;
318318
</para>
319319

320320
<para>
321-
Transaction identifiers are also 32-bit quantities. In a long-lived
322-
database it is possible for transaction IDs to wrap around. This
323-
is not a fatal problem given appropriate maintenance procedures;
324-
see <xref linkend="maintenance"> for details. However, it is
325-
unwise to depend on uniqueness of transaction IDs over the long term
326-
(more than one billion transactions).
321+
Transaction identifiers are also 32-bit quantities. In a
322+
long-lived database it is possible for transaction IDs to wrap
323+
around. This is not a fatal problem given appropriate maintenance
324+
procedures; see <xref linkend="maintenance"> for details. It is
325+
unwise, however, to depend on the uniqueness of transaction IDs
326+
over the long term (more than one billion transactions).
327327
</para>
328328

329329
<para>

doc/src/sgml/features.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.20 2003/09/20 20:12:04 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.21 2003/11/04 09:55:38 petere Exp $
33
-->
44

55
<appendix id="features">
@@ -30,7 +30,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.20 2003/09/20 20:12:04 tg
3030

3131
<para>
3232
<acronym>SQL92</acronym> defined three feature sets for conformance:
33-
Entry, Intermediate, and Full. Most database products claiming
33+
Entry, Intermediate, and Full. Most database management systems claiming
3434
<acronym>SQL</acronym> standard conformance were conforming at only
3535
the Entry level, since the entire set of features in the
3636
Intermediate and Full levels was either too voluminous or in

0 commit comments

Comments
 (0)