From: Bruce Momjian Date: Sat, 19 Feb 2011 03:39:17 +0000 (-0500) Subject: Document that text search comparisons happen after text search X-Git-Tag: REL9_1_ALPHA4~135 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5bba4948eb835413cc4a5ca1e2f7255ce4c78e69;p=postgresql Document that text search comparisons happen after text search configuration rules. Erik Rijkers --- diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 2bf411d9e2..10f0e590d7 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -3847,7 +3847,28 @@ SELECT 'super:*'::tsquery; 'super':* This query will match any word in a tsvector that begins - with super. + with super. + + + + Note that text search configuration processing happens before + comparisons, which means this comparison returns true: + +SELECT to_tsvector( 'postgraduate' ) @@ to_tsquery( 'postgres:*' ); + ?column? +---------- + t +(1 row) + + because postgres gets stemmed to postgr: + +SELECT to_tsquery('postgres:*'); + to_tsquery +------------ + 'postgr':* +(1 row) + + which then matches postgraduate.