8000 Minor copy-editing. · dirbacke/postgres@0684043 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0684043

Browse files
committed
Minor copy-editing.
1 parent b72c1b9 commit 0684043

File tree

4 files changed

+42
-39
lines changed

4 files changed

+42
-39
lines changed

doc/src/sgml/ddl.sgml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ddl.sgml,v 1.16 2003/08/10 01:20:34 tgl Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ddl.sgml,v 1.17 2003/08/14 23:13:27 tgl Exp $ -->
22

33
<chapter id="ddl">
44
<title>Data Definition</title>
@@ -490,7 +490,7 @@ CREATE TABLE products (
490490
price numeric NOT NULL CHECK (price > 0)
491491
);
492492
</programlisting>
493-
The order doesn't matter. It does not necessarily affect in which
493+
The order doesn't matter. It does not necessarily determine in which
494494
order the constraints are checked.
495495
</para>
496496

@@ -578,7 +578,7 @@ CREATE TABLE products (
578578
least) two rows in the table where the values of each of the
579579
corresponding columns that are part of the constraint are equal.
580580
However, null values are not considered equal in this
581-
consideration. That means, in the presence of a multicolumn
581+
consideration. That means even in the presence of a
582582
unique constraint it is possible to store an unlimited number of
583583
rows that contain a null value in at least one of the constrained
584584
columns. This behavior conforms to the SQL standard, but we have
@@ -629,7 +629,7 @@ CREATE TABLE example (
629629
A primary key indicates that a column or group of columns can be
630630
used as a unique identifier for rows in the table. (This is a
631631
direct consequence of the definition of a primary key. Note that
632-
a unique constraint does not, in fact, provide a unique identifier
632+
a unique constraint does not, by itself, provide a unique identifier
633633
because it does not exclude null values.) This is useful both for
634634
documentation purposes and for client applications. For example,
635635
a GUI application that allows modifying row values probably needs
@@ -850,8 +850,9 @@ CREATE TABLE capitals (
850850
In this case, a row of capitals <firstterm>inherits</firstterm> all
851851
attributes (name, population, and altitude) from its
852852
parent, cities. The type of the attribute name is
853-
<type>text</type>, a native <productname>PostgreSQL</productname> type for variable length
854-
ASCII strings. The type of the attribute population is
853+
<type>text</type>, a native <productname>PostgreSQL</productname> type
854+
for variable length character strings. The type of the attribute
855+
population is
855856
<type>float</type>, a native <productname>PostgreSQL</productname> type for double precision
856857
floating-point numbers. State capitals have an extra
857858
attribute, state, that shows their state. In <productname>PostgreSQL</productname>,
@@ -964,7 +965,7 @@ WHERE c.altitude &gt; 500 and c.tableoid = p.oid;
964965
<para>
965966
In previous versions of <productname>PostgreSQL</productname>, the
966967
default was not to get access to child tables. This was found to
967-
be error prone and is also in violation of the SQL standard. Under the old
968+
be error prone and is also in violation of the SQL99 standard. Under the old
968969
syntax, to get the sub-tables you append <literal>*</literal> to the table name.
969970
For example
970971
<programlisting>
@@ -1180,7 +1181,8 @@ ALTER TABLE products RENAME TO items;
11801181
<note>
11811182
<para>
11821183
To change the owner of a table, index, sequence, or view, use the
1183-
<command>ALTER TABLE</command> command.
1184+
<xref linkend="sql-altertable" endterm="sql-altertable-title">
1185+
command.
11841186
</para>
11851187
</note>
11861188

@@ -1192,7 +1194,8 @@ ALTER TABLE products RENAME TO items;
11921194
<literal>USAGE</>, and <literal>ALL PRIVILEGES</>. For complete
11931195
information on the different types of privileges supported by
11941196
<productname>PostgreSQL</productname>, refer to the
1195-
<command>GRANT</command> reference page. The following sections
1197+
<xref linkend="sql-grant" endterm="sql-grant-title">
1198+
reference page. The following sections
11961199
and chapters will also show you how those privileges are used.
11971200
</para>
11981201

@@ -1453,8 +1456,8 @@ SHOW search_path;
14531456
$user,public
14541457
</screen>
14551458
The first element specifies that a schema with the same name as
1456-
the current user is to be searched. Since no such schema exists
1457-
yet, this entry is ignored. The second element refers to the
1459+
the current user is to be searched. If no such schema exists,
1460+
the entry is ignored. The second element refers to the
14581461
public schema that we have seen already.
14591462
</para>
14601463

@@ -1737,7 +1740,7 @@ DROP TABLE products CASCADE;
17371740
the possible dependencies varies with the type of the object. You
17381741
can also write <literal>RESTRICT</literal> instead of
17391742
<literal>CASCADE</literal> to get the default behavior which is to
1740-
restrict drops of objects that other objects depend on.
1743+
prevent drops of objects that other objects depend on.
17411744
</para>
17421745

17431746
<note>

doc/src/sgml/queries.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/queries.sgml,v 1.21 2003/04/10 01:22:44 petere Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/queries.sgml,v 1.22 2003/08/14 23:13:27 tgl Exp $ -->
22

33
<chapter id="queries">
44
<title>Queries</title>
@@ -1208,10 +1208,10 @@ SELECT <replaceable>select_list</replaceable>
12081208
</para>
12091209

12101210
<para>
1211-
When using <literal>LIMIT</>, it is a good idea to use an
1211+
When using <literal>LIMIT</>, it is important to use an
12121212
<literal>ORDER BY</> clause that constrains the result rows into a
12131213
unique order. Otherwise you will get an unpredictable subset of
1214-
the query's rows. --- You may be asking for the tenth through
1214+
the query's rows. You may be asking for the tenth through
12151215
twentieth rows, but tenth through twentieth in what ordering? The
12161216
ordering is unknown, unless you specified <literal>ORDER BY</>.
12171217
</para>

doc/src/sgml/syntax.sgml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.81 2003/08/09 22:50:22 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.82 2003/08/14 23:13:27 tgl Exp $
33
-->
44

55
<chapter id="sql-syntax">
@@ -450,14 +450,7 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
450450
'{{1,2,3},{4,5,6},{7,8,9}}'
451451
</programlisting>
452452
This constant is a two-dimensional, 3-by-3 array consisting of three
453-
subarrays of integers.
454-
</para>
455-
456-
<para>
457-
Individual array elements can be placed between double-quote
458-
marks (<literal>"</literal>) <!-- " --> to avoid ambiguity
459-
problems with respect to whitespace. Without quote marks, the
460-
array-value parser will skip leading whitespace.
453+
subarrays of integers. For more information see <xref linkend="arrays">.
461454
</para>
462455

463456
<para>
@@ -1190,8 +1183,10 @@ CAST ( <replaceable>expression</replaceable> AS <replaceable>type</replaceable>
11901183
one of the two standard cast syntaxes is used to do a run-time
11911184
conversion, it will internally invoke a registered function to
11921185
perform the conversion. By convention, these conversion functions
1193-
have the same name as their output type, but this is not something
1194-
that a portable application should rely on.)
1186+
have the same name as their output type, and thus the <quote>function-like
1187+
syntax</> is nothing more than a direct invocation of the underlying
1188+
conversion function. Obviously, this is not something that a portable
1189+
application should rely on.)
11951190
</para>
11961191
</sect2>
11971192

@@ -1349,8 +1344,10 @@ SELECT ... WHERE x &lt;&gt; 0 AND y/x &gt; 1.5;
13491344
<programlisting>
13501345
SELECT ... WHERE CASE WHEN x &lt;&gt; 0 THEN y/x &gt; 1.5 ELSE false END;
13511346
</programlisting>
1352-
A <literal>CASE</> construct used in this fashion will defeat optimization attempts,
1353-
so it should only be done when necessary.
1347+
A <literal>CASE</> construct used in this fashion will defeat optimization
1348+
attempts, so it should only be done when necessary. (In this particular
1349+
example, it would doubtless be best to sidestep the problem by writing
1350+
<literal>y &gt; 1.5*x</> instead.)
13541351
</para>
13551352
</sect2>
13561353
</sect1>

doc/src/sgml/typeconv.sgml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/typeconv.sgml,v 1.31 2003/05/26 00:11:27 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/typeconv.sgml,v 1.32 2003/08/14 23:13:27 tgl Exp $
33
-->
44

55
<chapter Id="typeconv">
@@ -113,15 +113,16 @@ with, and perhaps converted to, the types of the target columns.
113113
</varlistentry>
114114
<varlistentry>
115115
<term>
116-
<literal>UNION</literal> and <literal>CASE</literal> constructs
116+
<literal>UNION</literal>, <literal>CASE</literal>, and <literal>ARRAY</literal> constructs
117117
</term>
118118
<listitem>
119119
<para>
120-
Since all query results from a unionized <literal>SELECT</literal> statement must appear in a single
121-
set of columns, the types of the results
122-
of each <literal>SELECT</> clause must be matched up and converted to a uniform set.
123-
Similarly, the branch expressions of a <literal>CASE</> construct must be converted to
124-
a common type so that the <literal>CASE</> expression as a whole has a known output type.
120+
Since all query results from a unionized <literal>SELECT</literal> statement
121+
must appear in a single set of columns, the types of the results of each
122+
<literal>SELECT</> clause must be matched up and converted to a uniform set.
123+
Similarly, the branch expressions of a <literal>CASE</> construct must be
124+
converted to a common type so that the <literal>CASE</> expression as a whole
125+
has a known output type. The same holds for <literal>ARRAY</> constructs.
125126
</para>
126127
</listitem>
127128
</varlistentry>
@@ -754,20 +755,22 @@ padding spaces.
754755
</sect1>
755756

756757
<sect1 id="typeconv-union-case">
757-
<title><literal>UNION</> and <literal>CASE</> Constructs</title>
758+
<title><literal>UNION</literal>, <literal>CASE</literal>, and
759+
<literal>ARRAY</literal> Constructs</title>
758760

759761
<para>
760762
SQL <literal>UNION</> constructs must match up possibly dissimilar types to
761763
become a single result set. The resolution algorithm is applied separately
762764
to each output column of a union query. The <literal>INTERSECT</> and
763765
<literal>EXCEPT</> constructs resolve dissimilar types in the same way as
764766
<literal>UNION</>.
765-
A <literal>CASE</> construct also uses the identical algorithm to match up its
766-
component expressions and select a result data type.
767+
A <literal>CASE</> construct uses the identical algorithm to match up its
768+
component expressions and select a result data type, as does <literal>ARRAY</>.
767769
</para>
768770

769771
<procedure>
770-
<title><literal>UNION</> and <literal>CASE</> Type Resolution</title>
772+
<title><literal>UNION</literal>, <literal>CASE</literal>, and
773+
<literal>ARRAY</literal> Type Resolution</title>
771774

772775
<step performance="required">
773776
<para>

0 commit comments

Comments
 (0)
0