Home Explore Blog CI



postgresql

4th chunk of `doc/src/sgml/pgtrgm.sgml`
d069b1e5a98aa310294627859d5e89a6eff6749cf244ea0a0000000100000fa4
     </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>text</type> <literal>&lt;%</literal> <type>text</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Returns <literal>true</literal> if the similarity between the trigram
        set in the first argument and a continuous extent of an ordered trigram
        set in the second argument is greater than the current word similarity
        threshold set by <varname>pg_trgm.word_similarity_threshold</varname>
        parameter.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>text</type> <literal>%&gt;</literal> <type>text</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Commutator of the <literal>&lt;%</literal> operator.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>text</type> <literal>&lt;&lt;%</literal> <type>text</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Returns <literal>true</literal> if its second argument has a continuous
        extent of an ordered trigram set that matches word boundaries,
        and its similarity to the trigram set of the first argument is greater
        than the current strict word similarity threshold set by the
        <varname>pg_trgm.strict_word_similarity_threshold</varname> parameter.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>text</type> <literal>%&gt;&gt;</literal> <type>text</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Commutator of the <literal>&lt;&lt;%</literal> operator.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>text</type> <literal>&lt;-&gt;</literal> <type>text</type>
        <returnvalue>real</returnvalue>
       </para>
       <para>
        Returns the <quote>distance</quote> between the arguments, that is
        one minus the <function>similarity()</function> value.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>text</type> <literal>&lt;&lt;-&gt;</literal> <type>text</type>
        <returnvalue>real</returnvalue>
       </para>
       <para>
        Returns the <quote>distance</quote> between the arguments, that is
        one minus the <function>word_similarity()</function> value.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>text</type> <literal>&lt;-&gt;&gt;</literal> <type>text</type>
        <returnvalue>real</returnvalue>
       </para>
       <para>
        Commutator of the <literal>&lt;&lt;-&gt;</literal> operator.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>text</type> <literal>&lt;&lt;&lt;-&gt;</literal> <type>text</type>
        <returnvalue>real</returnvalue>
       </para>
       <para>
        Returns the <quote>distance</quote> between the arguments, that is
        one minus the <function>strict_word_similarity()</function> value.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>text</type> <literal>&lt;-&gt;&gt;&gt;</literal> <type>text</type>
        <returnvalue>real</returnvalue>
       </para>
       <para>
        Commutator of the <literal>&lt;&lt;&lt;-&gt;</literal> operator.
       </para></entry>
      </row>
     </tbody>
    </tgroup>
  </table>
 </sect2>

 <sect2 id="pgtrgm-guc">
  <title>GUC Parameters</title>

  <variablelist>
   <varlistentry id="guc-pgtrgm-similarity-threshold" xreflabel="pg_trgm.similarity_threshold">
    <term>

Title: pg_trgm Operators and GUC Parameters
Summary
This section details the various operators available in the `pg_trgm` extension for PostgreSQL, including those that check trigram similarity against set thresholds (`%`, `<%`, `%>`, `<<%`, `%>>`) and those that calculate the distance between strings based on similarity (`<->`, `<<->`, `<->>`, `<<<->`, `<->>>`). It also introduces the configurable parameters (GUCs) used to fine-tune the behavior of these operators and functions.