Clarify use of btree indexes for ILIKE and ~*.
authorBruce Momjian
Wed, 18 Jan 2006 21:29:45 +0000 (21:29 +0000)
committerBruce Momjian
Wed, 18 Jan 2006 21:29:45 +0000 (21:29 +0000)
doc/src/sgml/indices.sgml

index 5fa1e79fefb0c5798f3a4599b7f282d5ae7acb20..9bb19c2cee0b71cba4330a3e9277f0b8671f8c4e 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Indexes
@@ -141,17 +141,21 @@ CREATE INDEX test1_id_index ON test1 (id);
 
   
    The optimizer can also use a B-tree index for queries involving the
-   pattern matching operators LIKE,
-   ILIKE~, and
-   ~*if the pattern is a constant
-   and is anchored to the beginning of the string — for example,
-   col LIKE 'foo%' or col ~ '^foo',
-   but not col LIKE '%bar'.  However, if your server does
-   not use the C locale you will need to create the index with a
-   special operator class to support indexing of pattern-matching queries.
-   See  below.
+   pattern matching operators LIKE and ~
+   if the pattern is a constant and is anchored to
+   the beginning of the string — for example, col LIKE
+   'foo%' or col ~ '^foo', but not
+   col LIKE '%bar'. However, if your server does not
+   use the C locale you will need to create the index with a special
+   operator class to support indexing of pattern-matching queries. See
+    below. It is also possible to use
+   B-tree indexes for ILIKE and
+   ~*, but only if the pattern starts with
+   non-alphabetic characters, i.e. characters that are not affected by
+   upper/lower case conversion.
   
 
+
   
    
     index