Skip to content

Commit 5bba494

Browse files
committed
Document that text search comparisons happen after text search
configuration rules. Erik Rijkers
1 parent 82220e8 commit 5bba494

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

doc/src/sgml/datatype.sgml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3847,7 +3847,28 @@ SELECT 'super:*'::tsquery;
38473847
'super':*
38483848
</programlisting>
38493849
This query will match any word in a <type>tsvector</> that begins
3850-
with <quote>super</>.
3850+
with <quote>super</>.
3851+
</para>
3852+
3853+
<para>
3854+
Note that text search configuration processing happens before
3855+
comparisons, which means this comparison returns <literal>true</>:
3856+
<programlisting>
3857+
SELECT to_tsvector( 'postgraduate' ) @@ to_tsquery( 'postgres:*' );
3858+
?column?
3859+
----------
3860+
t
3861+
(1 row)
3862+
</programlisting>
3863+
because <literal>postgres</> gets stemmed to <literal>postgr</>:
3864+
<programlisting>
3865+
SELECT to_tsquery('postgres:*');
3866+
to_tsquery
3867+
------------
3868+
'postgr':*
3869+
(1 row)
3870+
</programlisting>
3871+
which then matches <literal>postgraduate</>.
38513872
</para>
38523873

38533874
<para>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy