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

Commit 1903221

Browse files
committed
Minor copy-editing.
1 parent 681ed4e commit 1903221

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

doc/src/sgml/ref/create_cast.sgml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_cast.sgml,v 1.2 2002/08/11 17:44:12 petere Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_cast.sgml,v 1.3 2002/09/01 02:37:02 tgl Exp $ -->
22

33
<refentry id="SQL-CREATECAST">
44
<refmeta>
@@ -28,8 +28,8 @@ CREATE CAST (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</r
2828

2929
<para>
3030
<command>CREATE CAST</command> defines a new cast. A cast
31-
specifies which function can be invoked when a conversion between
32-
two data types is requested. For example,
31+
specifies how to perform a conversion between
32+
two data types. For example,
3333
<programlisting>
3434
SELECT CAST(42 AS text);
3535
</programlisting>
@@ -49,7 +49,7 @@ SELECT CAST(42 AS text);
4949
</para>
5050

5151
<para>
52-
A cast can marked <literal>AS ASSIGNMENT</>, which means that it
52+
A cast can be marked <literal>AS ASSIGNMENT</>, which means that it
5353
can be invoked implicitly in any context where the conversion it
5454
defines is required. Cast functions not so marked can be invoked
5555
only by explicit <literal>CAST</>,
@@ -72,7 +72,7 @@ INSERT INTO foo(f1) VALUES(42);
7272
<productname>PostgreSQL</productname> to choose surprising
7373
interpretations of commands, or to be unable to resolve commands at
7474
all because there are multiple possible interpretations. A good
75-
rule of thumb is to make cast implicitly invokable only for
75+
rule of thumb is to make a cast implicitly invokable only for
7676
information-preserving transformations between types in the same
7777
general type category. For example, <type>int2</type> to
7878
<type>int4</type> casts can reasonably be implicit, but be wary of
@@ -161,9 +161,10 @@ INSERT INTO foo(f1) VALUES(42);
161161
<para>
162162
Prior to PostgreSQL 7.3, every function that had the same name as a
163163
data type, returned that data type, and took one argument of a
164-
different type was automatically a cast function. This system has
164+
different type was automatically a cast function. This convention has
165165
been abandoned in face of the introduction of schemas and to be
166-
able to store binary compatible casts. The built-in cast functions
166+
able to represent binary compatible casts in the catalogs. The built-in
167+
cast functions
167168
still follow this naming scheme, but they have to be declared as
168169
casts explicitly now.
169170
</para>
@@ -175,7 +176,7 @@ INSERT INTO foo(f1) VALUES(42);
175176

176177
<para>
177178
To create a cast from type <type>text</type> to type
178-
<type>int</type> using the function <literal>int4(text)</literal>:
179+
<type>int4</type> using the function <literal>int4(text)</literal>:
179180
<programlisting>
180181
CREATE CAST (text AS int4) WITH FUNCTION int4(text);
181182
</programlisting>

0 commit comments

Comments
 (0)