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

Commit ee214de

Browse files
committed
Add more detail for non-TEXT cast release item.
1 parent 166f67c commit ee214de

File tree

1 file changed

+37
-13
lines changed

1 file changed

+37
-13
lines changed

doc/src/sgml/release.sgml

+37-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.538 2007/11/15 17:09:40 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.539 2007/11/15 20:10:32 momjian Exp $ -->
22
<!--
33

44
Typical markup:
@@ -250,17 +250,42 @@ do it for earlier branch release files.
250250

251251
<listitem>
252252
<para>
253-
Queries that previously automatically cast values to
254-
<type>TEXT</type> might now need explicit casts (Peter, Tom)
253+
Non-character values are no longer automatically cast to
254+
<type>TEXT</> (Peter, Tom)
255+
</para>
256+
257+
<para>
258+
Previously, a function or operator that took a <type>TEXT</>
259+
parameter used to automatically cast a non-<type>TEXT</> value to
260+
<type>TEXT</> and call the function or operator (assuming there was
261+
no other matching function or operator). That no longer happens
262+
and an explicit cast to <type>TEXT</> is now required. For example,
263+
these expressions now throw an error:
264+
265+
<programlisting>
266+
substr(current_date, 1, 1);
267+
23 LIKE '%2%'
268+
5.4 ~ '6';
269+
</programlisting>
270+
271+
but these work because of the explicit casts:
272+
273+
<programlisting>
274+
substr(current_date::text, 1, 1);
275+
23::text LIKE '%2%
276+
5.4::text ~ '6';
277+
</programlisting>
278+
</para>
279+
280+
<para>
281+
<type>CHAR</> and <type>VARCHAR</> still cast to <type>TEXT</>
282+
automatically. Concatenation (<literal>||</>) with non-<type>TEXT</>
283+
types is still automatically cast, assuming one of the parameters
284+
is textual. While this change will require additional casts for
285+
some queries, it also eliminates some unusual behavior.
255286
</para>
256287

257288
<para>
258-
Data types other than <type>CHAR</> and <type>VARCHAR</> no
259-
longer automatically cast to <type>TEXT</>, except in the
260-
limited case of concatenation (<literal>||</>) where the other
261-
input is textual. While this change will require additional
262-
casts for some queries it also eliminates some unusual
263-
behavior.
264289
</para>
265290
</listitem>
266291

@@ -1035,10 +1060,9 @@ do it for earlier branch release files.
10351060
</para>
10361061

10371062
<para>
1038-
This features was previously in <filename>contrib/tsearch2</>. It
1039-
has been improved, moved into the server, and is now installed by
1040-
default. <filename>contrib/tsearch2</> now contains a compatibility
1041-
interface.
1063+
Text search has been improved, moved into the server, and is now
1064+
installed by default. <filename>contrib/tsearch2</> now contains
1065+
a compatibility interface.
10421066
</para>
10431067
</listitem>
10441068

0 commit comments

Comments
 (0)