Skip to content

Commit 7d3ab8a

Browse files
committed
A bit of minor copy-editing.
1 parent 55337e4 commit 7d3ab8a

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

doc/src/sgml/ddl.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/ddl.sgml,v 1.44 2005/08/13 01:55:41 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/ddl.sgml,v 1.45 2005/10/23 19:29:49 tgl Exp $ -->
22

33
<chapter id="ddl">
44
<title>Data Definition</title>
@@ -240,7 +240,7 @@ CREATE TABLE products (
240240
in a table. For many applications, however, the constraint they
241241
provide is too coarse. For example, a column containing a product
242242
price should probably only accept positive values. But there is no
243-
data type that accepts only positive numbers. Another issue is
243+
standard data type that accepts only positive numbers. Another issue is
244244
that you might want to constrain column data with respect to other
245245
columns or rows. For example, in a table containing product
246246
information, there should only be one row for each product number.
@@ -431,7 +431,7 @@ CREATE TABLE products (
431431
IS NOT NULL)</literal>, but in
432432
<productname>PostgreSQL</productname> creating an explicit
433433
not-null constraint is more efficient. The drawback is that you
434-
cannot give explicit names to not-null constraints created that
434+
cannot give explicit names to not-null constraints created this
435435
way.
436436
</para>
437437

@@ -551,7 +551,7 @@ CREATE TABLE products (
551551
columns included in the constraint are equal.
552552
However, null values are not considered equal in this
553553
comparison. That means even in the presence of a
554-
unique constraint it is possible to store an unlimited number of
554+
unique constraint it is possible to store duplicate
555555
rows that contain a null value in at least one of the constrained
556556
columns. This behavior conforms to the SQL standard, but we have
557557
heard that other SQL databases may not follow this rule. So be

doc/src/sgml/syntax.sgml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.103 2005/08/14 22:19:50 petere Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.104 2005/10/23 19:29:49 tgl Exp $
33
-->
44

55
<chapter id="sql-syntax">
@@ -260,7 +260,7 @@ UPDATE "my_table" SET "a" = 5;
260260
<literal>\n</literal> is a newline, <literal>\r</literal> is a
261261
carriage return, <literal>\t</literal> is a tab. Also supported is
262262
<literal>\<replaceable>digits</replaceable></literal>, where
263-
<replaceable>ddd</replaceable> represents an octal byte value, and
263+
<replaceable>digits</replaceable> represents an octal byte value, and
264264
<literal>\x<replaceable>hexdigits</replaceable></literal>, where
265265
<replaceable>hexdigits</replaceable> represents a hexadecimal byte value.
266266
(It is your responsibility that the byte sequences you create are
@@ -544,6 +544,16 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
544544
is that it does not work for array types; use <literal>::</literal>
545545
or <literal>CAST()</literal> to specify the type of an array constant.
546546
</para>
547+
548+
<para>
549+
The <literal>CAST()</> syntax conforms to SQL. The
550+
<literal><replaceable>type</replaceable> '<replaceable>string</replaceable>'</literal>
551+
syntax is a generalization of the standard: SQL specifies this syntax only
552+
for a few datatypes, but <productname>PostgreSQL</productname> allows it
553+
for all types. The syntax with
554+
<literal>::</literal> is historical <productname>PostgreSQL</productname>
555+
usage, as is the function-call syntax.
556+
</para>
547557
</sect3>
548558
</sect2>
549559

@@ -1105,8 +1115,8 @@ CREATE FUNCTION dept(text) RETURNS dept
11051115
LANGUAGE SQL;
11061116
</programlisting>
11071117

1108-
Here the <literal>$1</literal> will be replaced by the first
1109-
function argument when the function is invoked.
1118+
Here the <literal>$1</literal> references the value of the first
1119+
function argument whenever the function is invoked.
11101120
</para>
11111121
</sect2>
11121122

0 commit comments

Comments
 (0)