Index: doc/src/sgml/citext.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/citext.sgml,v
retrieving revision 1.1
diff -u -r1.1 citext.sgml
--- doc/src/sgml/citext.sgml 29 Jul 2008 18:31:20 -0000 1.1
+++ doc/src/sgml/citext.sgml 12 Sep 2008 16:48:34 -0000
@@ -96,6 +96,72 @@
+ String Comparison Notes
+
+ In order to emulate a case-insentive collation as closely as possible, a
+ number all of the comparision operators and functions have been overridden
+ to support citext>. So, for example, the regular expression
+ operators ~> and ~*> exhibit the same behavior, which
+ is to say that they both compare case-insensitively. The same is true
+ for !~> and !~*>, as well as for the
+ LIKE> operators ~~> and ~~*>, and
+ !~~> and !~~*>. If you'd like to match
+ case-sensitively, you can always cast to text> before comparing.
+
+
+
+ The same holds true for comparision functions. All of the following
+ functions behave case-insensitively if either of their comparators
+ is citext>:
+
+
+
+
+
+ regexp_replace()>
+
+
+
+
+ regexp_split_to_array()>
+
+
+
+
+ regexp_split_to_table()>
+
+
+
+
+ replace()>
+
+
+
+
+ split_part()>
+
+
+
+
+ strpos()>
+
+
+
+
+ translate()>
+
+
+
+
+
+ For the regexp functions, if you want to match case-sensitively, you can
+ always use the c> flag to force a case-senstive match. Otherwise,
+ you must cast to text> before calling a function.
+
+
+
+
+
Limitations
@@ -116,60 +182,6 @@
- The pattern-matching comparison operators, such as LIKE>,
- ~>, ~~>, !~>, !~~>, etc.,
- have been overloaded to make case-insensitive comparisons when their
- left-hand argument is of type citext>. However, related
- functions have not been changed, including:
-
-
-
-
-
- regexp_replace()>
-
-
-
-
- regexp_split_to_array()>
-
-
-
-
- regexp_split_to_table()>
-
-
-
-
- replace()>
-
-
-
-
- split_part()>
-
-
-
-
- strpos()>
-
-
-
-
- translate()>
-
-
-
-
-
- Of course, for the regular expression functions, you can specify
- case-insensitive comparisons in their flags> arguments, but
- the same cannot be done for the the non-regexp functions.
-
-
-
-
-
citext> is not as efficient as text> because the
operator functions and the btree comparison functions must make copies
of the data and convert it to lower case for comparisons. It is,