Re: Suggestion on Document for Version 12 Section 40.3

Daniel Gustafsson <[email protected]> Thu, 9 Jan 2020 10:42:10 +0100
Newsgroups gmane.comp.db.postgresql.devel.documentation
Message-ID <[email protected]>
--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 <[email protected]> =
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';
 </programlisting>
 
     Either way, the word is spelled wrong, so let's look for what we might
-    have wanted.  Again using <literal>file_fdw</literal>:
+    have wanted.  Again using <literal>file_fdw</literal> and
+    <literal>pg_trgm</literal>:
 
 <programlisting>
 SELECT word FROM words ORDER BY word &lt;-&gt; 'caterpiler' LIMIT 10;

--Apple-Mail=_638B1BDD-F23E-41DD-AE49-2706C65A1999--