|
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 $ --> |
2 | 2 | <!--
|
3 | 3 |
|
4 | 4 | Typical markup:
|
@@ -250,17 +250,42 @@ do it for earlier branch release files.
|
250 | 250 |
|
251 | 251 | <listitem>
|
252 | 252 | <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. |
255 | 286 | </para>
|
256 | 287 |
|
257 | 288 | <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. |
264 | 289 | </para>
|
265 | 290 | </listitem>
|
266 | 291 |
|
@@ -1035,10 +1060,9 @@ do it for earlier branch release files.
|
1035 | 1060 | </para>
|
1036 | 1061 |
|
1037 | 1062 | <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. |
1042 | 1066 | </para>
|
1043 | 1067 | </listitem>
|
1044 | 1068 |
|
|
0 commit comments