Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
f6bd0da6
Commit
f6bd0da6
authored
Mar 22, 2016
by
Teodor Sigaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve docs of pg_trgm changes
Artur Zakirov, per gripe from Jeff Janes
parent
112a2d06
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
21 deletions
+37
-21
doc/src/sgml/pgtrgm.sgml
doc/src/sgml/pgtrgm.sgml
+37
-21
No files found.
doc/src/sgml/pgtrgm.sgml
View file @
f6bd0da6
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
</entry>
</entry>
</row>
</row>
<row>
<row>
<entry><type>text</> <literal>%>
</literal> <type>text</></entry>
<entry><type>text</> <literal><%
</literal> <type>text</></entry>
<entry><type>boolean</type></entry>
<entry><type>boolean</type></entry>
<entry>
<entry>
Returns <literal>true</> if its first argument has the similar word in
Returns <literal>true</> if its first argument has the similar word in
...
@@ -162,6 +162,13 @@
...
@@ -162,6 +162,13 @@
<varname>pg_trgm.word_similarity_threshold</> parameter.
<varname>pg_trgm.word_similarity_threshold</> parameter.
</entry>
</entry>
</row>
</row>
<row>
<entry><type>text</> <literal>%></literal> <type>text</></entry>
<entry><type>boolean</type></entry>
<entry>
Commutator of the <literal><%</> operator.
</entry>
</row>
<row>
<row>
<entry><type>text</> <literal><-></literal> <type>text</></entry>
<entry><type>text</> <literal><-></literal> <type>text</></entry>
<entry><type>real</type></entry>
<entry><type>real</type></entry>
...
@@ -172,7 +179,7 @@
...
@@ -172,7 +179,7 @@
</row>
</row>
<row>
<row>
<entry>
<entry>
<type>text</> <literal><->
></literal> <type>text</>
<type>text</> <literal><<-
></literal> <type>text</>
</entry>
</entry>
<entry><type>real</type></entry>
<entry><type>real</type></entry>
<entry>
<entry>
...
@@ -180,6 +187,15 @@
...
@@ -180,6 +187,15 @@
one minus the <function>word_similarity()</> value.
one minus the <function>word_similarity()</> value.
</entry>
</entry>
</row>
</row>
<row>
<entry>
<type>text</> <literal><->></literal> <type>text</>
</entry>
<entry><type>real</type></entry>
<entry>
Commutator of the <literal><<-></> operator.
</entry>
</row>
</tbody>
</tbody>
</tgroup>
</tgroup>
</table>
</table>
...
@@ -215,8 +231,8 @@
...
@@ -215,8 +231,8 @@
<listitem>
<listitem>
<para>
<para>
Sets the current word similarity threshold that is used by
Sets the current word similarity threshold that is used by
the <literal>%></> operator. The threshold must be between
<literal><%</> and <literal>%></> operators. The threshold
0 and 1 (default is 0.6).
must be between
0 and 1 (default is 0.6).
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
...
@@ -283,7 +299,7 @@ SELECT t, t <-> '<replaceable>word</>' AS dist
...
@@ -283,7 +299,7 @@ SELECT t, t <-> '<replaceable>word</>' AS dist
<programlisting>
<programlisting>
SELECT t, word_similarity('<replaceable>word</>', t) AS sml
SELECT t, word_similarity('<replaceable>word</>', t) AS sml
FROM test_trgm
FROM test_trgm
WHERE
t %> '<replaceable>word</>'
WHERE
'<replaceable>word</>' <% t
ORDER BY sml DESC, t;
ORDER BY sml DESC, t;
</programlisting>
</programlisting>
This will return all values in the text column that have a word
This will return all values in the text column that have a word
...
@@ -295,7 +311,7 @@ SELECT t, word_similarity('<replaceable>word</>', t) AS sml
...
@@ -295,7 +311,7 @@ SELECT t, word_similarity('<replaceable>word</>', t) AS sml
<para>
<para>
A variant of the above query is
A variant of the above query is
<programlisting>
<programlisting>
SELECT t,
t <->> '<replaceable>word</>'
AS dist
SELECT t,
'<replaceable>word</>' <<-> t
AS dist
FROM test_trgm
FROM test_trgm
ORDER BY dist LIMIT 10;
ORDER BY dist LIMIT 10;
</programlisting>
</programlisting>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment