aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2011-02-18 22:39:17 -0500
committerBruce Momjian <bruce@momjian.us>2011-02-18 22:39:52 -0500
commit5bba4948eb835413cc4a5ca1e2f7255ce4c78e69 (patch)
treed354209da51142912d227ce91f764c6d05ea7760 /doc/src
parent82220e883236c214d670c3f14d943690aa78bc17 (diff)
downloadpostgresql-5bba4948eb835413cc4a5ca1e2f7255ce4c78e69.tar.gz
postgresql-5bba4948eb835413cc4a5ca1e2f7255ce4c78e69.zip
Document that text search comparisons happen after text search
configuration rules. Erik Rijkers
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/datatype.sgml23
1 files changed, 22 insertions, 1 deletions
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index 2bf411d9e22..10f0e590d79 100644
--- a/doc/src/sgml/datatype.sgml
+++ b/doc/src/sgml/datatype.sgml
@@ -3847,7 +3847,28 @@ SELECT 'super:*'::tsquery;
'super':*
</programlisting>
This query will match any word in a <type>tsvector</> that begins
- with <quote>super</>.
+ with <quote>super</>.
+ </para>
+
+ <para>
+ Note that text search configuration processing happens before
+ comparisons, which means this comparison returns <literal>true</>:
+<programlisting>
+SELECT to_tsvector( 'postgraduate' ) @@ to_tsquery( 'postgres:*' );
+ ?column?
+----------
+ t
+(1 row)
+</programlisting>
+ because <literal>postgres</> gets stemmed to <literal>postgr</>:
+<programlisting>
+SELECT to_tsquery('postgres:*');
+ to_tsquery
+------------
+ 'postgr':*
+(1 row)
+</programlisting>
+ which then matches <literal>postgraduate</>.
</para>
<para>