public inbox for [email protected]
help / color / mirror / Atom feedFrom: Daniel Gustafsson <[email protected]>
To: [email protected]
To: [email protected]
Subject: Re: Suggestion on Document for Version 12 Section 40.3
Date: Thu, 9 Jan 2020 10:42:10 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
> On 9 Jan 2020, at 09:28, PG Doc comments form <[email protected]> wrote:
>
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/12/rules-materializedviews.html
> Description:
>
> Hello all,
>
>
> I'm reading Section 40.3, and there is an example (the third square by
> reverse order):
>
>
> SELECT word FROM words ORDER BY word <-> 'caterpiler' LIMIT 10;
>
> word
> ---------------
> cater
> caterpillar
> Caterpillar
> caterpillars
> caterpillar's
> Caterpillar's
> caterer
> caterer's
> caters
> catered
> (10 rows)
>
>
> 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
Attachments:
[application/octet-stream] rules_trgm.diff (579B, 2-rules_trgm.diff)
download | inline diff:
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 <-> 'caterpiler' LIMIT 10;
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Suggestion on Document for Version 12 Section 40.3
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox