not appropriate documentation in textsearch.sgml

From: "Wu, Fei" <wufei(dot)fnst(at)cn(dot)fujitsu(dot)com>
To: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: not appropriate documentation in textsearch.sgml
Date: 2019-08-26 09:53:45
Message-ID: 52E6E0843B9D774C8C73D6CF64402F0566124B5C@G08CNEXMBPEKD02.g08.fujitsu.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,all,I think I find a not appropriate documentation in the follow file:
https://github.com/postgres/postgres/blob/master/doc/src/sgml/textsearch.sgml
-----------------------------------------------------------------------
242 <para>
243 Full text searching in <productname>PostgreSQL</productname> is based on
244 the match operator <literal>@@</literal>, which returns
245 <literal>true</literal> if a <type>tsvector</type>
246 (document) matches a <type>tsquery</type> (query).
247 It doesn't matter which data type is written first:
248
249<programlisting>
250SELECT 'a fat cat sat on a mat and ate a fat rat'::tsvector @@ 'cat &amp; rat'::tsquery;
251 ?column?
252----------
253 t
254
255SELECT 'fat &amp; cow'::tsquery @@ 'a fat cat sat on a mat and ate a fat rat'::tsvector;
256 ?column?
257----------
258 f
259</programlisting>
260 </para>
--------------------------------------------------------------------------
From line 242 to line 247 ,we know that this para is to say that “It doesn't matter which data type is written first in operator @@”.
So, from line 250 to 260 ,two example sqls were showed to explain that.

But,we can see that two sql is quuite different,which is hard to show the opinion.

I think maybe a example with two “same sql” which has just different order of data type is more clear. just like below:
Sql A:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
SELECT 'a fat cat sat on a mat and ate a fat rat'::tsvector @@ 'cat & rat'::tsquery;
?column?
----------
t

Sql B:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
postgres=# SELECT 'cat & rat'::tsquery @@ 'a fat cat sat on a mat and ate a fat rat';
?column?
----------
t
(1 row)

With the above two sql ,we can clearly see that It doesn't matter which data type is written first in operator @@.

--
Best Regards
-----------------------------------------------------
Wu Fei
Development Department II
Software Division III
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
ADDR.: No.6 Wenzhu Road, Software Avenue,
Nanjing, 210012, China
TEL : +86+25-86630566-9356
COINS: 7998-9356
FAX: +86+25-83317685
MAIL:wufei(dot)fnst(at)cn(dot)fujitsu(dot)com
http://www.fujitsu.com/cn/fnst/
---------------------------------------------------

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2019-08-26 12:33:38 BUG #15979: PG_VERSION , pg_tblspc got deleted automatically & postgres server creased.
Previous Message jungle boogie 2019-08-26 06:46:05 Re: BUG #15964: vacuumdb.c:187:10: error: use of undeclared identifier 'FD_SETSIZE'