From: Tom Lane Date: Sun, 1 Sep 2002 02:37:02 +0000 (+0000) Subject: Minor copy-editing. X-Git-Tag: REL7_3~657 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1903221517b7a5d8846d77160d9bad61721d48a1;p=postgresql Minor copy-editing. --- diff --git a/doc/src/sgml/ref/create_cast.sgml b/doc/src/sgml/ref/create_cast.sgml index 7fd5ba0d47..00a4471966 100644 --- a/doc/src/sgml/ref/create_cast.sgml +++ b/doc/src/sgml/ref/create_cast.sgml @@ -1,4 +1,4 @@ - + @@ -28,8 +28,8 @@ CREATE CAST (sourcetype AS targettype CREATE CAST defines a new cast. A cast - specifies which function can be invoked when a conversion between - two data types is requested. For example, + specifies how to perform a conversion between + two data types. For example, SELECT CAST(42 AS text); @@ -49,7 +49,7 @@ SELECT CAST(42 AS text); - A cast can marked AS ASSIGNMENT, which means that it + A cast can be marked AS ASSIGNMENT, which means that it can be invoked implicitly in any context where the conversion it defines is required. Cast functions not so marked can be invoked only by explicit CAST, @@ -72,7 +72,7 @@ INSERT INTO foo(f1) VALUES(42); PostgreSQL to choose surprising interpretations of commands, or to be unable to resolve commands at all because there are multiple possible interpretations. A good - rule of thumb is to make cast implicitly invokable only for + rule of thumb is to make a cast implicitly invokable only for information-preserving transformations between types in the same general type category. For example, int2 to int4 casts can reasonably be implicit, but be wary of @@ -161,9 +161,10 @@ INSERT INTO foo(f1) VALUES(42); Prior to PostgreSQL 7.3, every function that had the same name as a data type, returned that data type, and took one argument of a - different type was automatically a cast function. This system has + different type was automatically a cast function. This convention has been abandoned in face of the introduction of schemas and to be - able to store binary compatible casts. The built-in cast functions + able to represent binary compatible casts in the catalogs. The built-in + cast functions still follow this naming scheme, but they have to be declared as casts explicitly now. @@ -175,7 +176,7 @@ INSERT INTO foo(f1) VALUES(42); To create a cast from type text to type - int using the function int4(text): + int4 using the function int4(text): CREATE CAST (text AS int4) WITH FUNCTION int4(text);