Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ipUKZ-0002Ia-FH for pgsql-docs@arkaria.postgresql.org; Thu, 09 Jan 2020 09:42:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ipUKY-0004Lv-0n for pgsql-docs@arkaria.postgresql.org; Thu, 09 Jan 2020 09:42:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ipUKX-0004Lo-M7 for pgsql-docs@lists.postgresql.org; Thu, 09 Jan 2020 09:42:17 +0000 Received: from smtp2.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ipUKV-0004mS-2J for pgsql-docs@lists.postgresql.org; Thu, 09 Jan 2020 09:42:16 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id EE2BC2E448E1 for ; Thu, 9 Jan 2020 10:42:11 +0100 (CET) Received: from s630.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id CE99B2E29476; Thu, 9 Jan 2020 10:42:11 +0100 (CET) Received: from s471.loopia.se (unknown [172.22.191.6]) by s630.loopia.se (Postfix) with ESMTP id 96E1B13ABE90; Thu, 9 Jan 2020 10:42:11 +0100 (CET) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1] autolearn=disabled Received: from s499.loopia.se ([172.22.191.5]) by s471.loopia.se (s471.loopia.se [172.22.190.11]) (amavisd-new, port 10024) with LMTP id d4bNqaILbRMW; Thu, 9 Jan 2020 10:42:11 +0100 (CET) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.193 Received: from [192.168.72.43] (customer-89-255-232-193.stosn.net [89.255.232.193]) (Authenticated sender: daniel@yesql.se) by s499.loopia.se (Postfix) with ESMTPSA id 2BBF91CDAEEC; Thu, 9 Jan 2020 10:42:11 +0100 (CET) From: Daniel Gustafsson Content-Type: multipart/mixed; boundary="Apple-Mail=_638B1BDD-F23E-41DD-AE49-2706C65A1999" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Suggestion on Document for Version 12 Section 40.3 Date: Thu, 9 Jan 2020 10:42:10 +0100 References: <157855848580.29169.11958103978637887119@wrigleys.postgresql.org> To: zhangysh1995@gmail.com, pgsql-docs@lists.postgresql.org In-Reply-To: <157855848580.29169.11958103978637887119@wrigleys.postgresql.org> Message-Id: <6E6064A4-D57B-4DF0-A0BF-4DFA745ACD47@yesql.se> X-Mailer: Apple Mail (2.3445.104.11) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_638B1BDD-F23E-41DD-AE49-2706C65A1999 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 9 Jan 2020, at 09:28, PG Doc comments form = wrote: >=20 > The following documentation comment has been logged on the website: >=20 > Page: https://www.postgresql.org/docs/12/rules-materializedviews.html > Description: >=20 > Hello all, >=20 >=20 > I'm reading Section 40.3, and there is an example (the third square by > reverse order): >=20 >=20 > SELECT word FROM words ORDER BY word <-> 'caterpiler' LIMIT 10; >=20 > word =20 > --------------- > cater > caterpillar > Caterpillar > caterpillars > caterpillar's > Caterpillar's > caterer > caterer's > caters > catered > (10 rows) >=20 >=20 > As shown here https://www.postgresql.org/docs/current/pgtrgm.html, the > operator `<->` is in an additional module. Without the context, the = reader > will need searching to help understand the meaning. It would be better = if > further reference is given. I agree that this could lead to unnecessary confusion for readers, and = since we are already mentioning that file_fdw is used it seems reasonable to also mention pg_trgm. A suggested patch is attached. cheers ./daniel --Apple-Mail=_638B1BDD-F23E-41DD-AE49-2706C65A1999 Content-Disposition: attachment; filename=rules_trgm.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="rules_trgm.diff" Content-Transfer-Encoding: 7bit diff --git a/doc/src/sgml/rules.sgml b/doc/src/sgml/rules.sgml index 2610645663..bcf860b68b 100644 --- a/doc/src/sgml/rules.sgml +++ b/doc/src/sgml/rules.sgml @@ -1039,7 +1039,8 @@ SELECT count(*) FROM words WHERE word = 'caterpiler'; Either way, the word is spelled wrong, so let's look for what we might - have wanted. Again using file_fdw: + have wanted. Again using file_fdw and + pg_trgm: SELECT word FROM words ORDER BY word <-> 'caterpiler' LIMIT 10; --Apple-Mail=_638B1BDD-F23E-41DD-AE49-2706C65A1999--