Home Explore Blog CI



postgresql

5th chunk of `doc/src/sgml/ltree.sgml`
73ddfba589db7e7c0cb516a3a405e560dd58eb4257fa9dca0000000100000fa0
 <type>ltree</type>?
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>ltree[]</type> <literal>&lt;@</literal> <type>ltree</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para role="func_signature">
        <type>ltree</type> <literal>@&gt;</literal> <type>ltree[]</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Does array contain a descendant of <type>ltree</type>?
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>ltree[]</type> <literal>~</literal> <type>lquery</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para role="func_signature">
        <type>lquery</type> <literal>~</literal> <type>ltree[]</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Does array contain any path matching <type>lquery</type>?
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>ltree[]</type> <literal>?</literal> <type>lquery[]</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para role="func_signature">
        <type>lquery[]</type> <literal>?</literal> <type>ltree[]</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Does <type>ltree</type> array contain any path matching
        any <type>lquery</type>?
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>ltree[]</type> <literal>@</literal> <type>ltxtquery</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para role="func_signature">
        <type>ltxtquery</type> <literal>@</literal> <type>ltree[]</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Does array contain any path matching <type>ltxtquery</type>?
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>ltree[]</type> <literal>?@&gt;</literal> <type>ltree</type>
        <returnvalue>ltree</returnvalue>
       </para>
       <para>
        Returns first array entry that is an ancestor of <type>ltree</type>,
        or <literal>NULL</literal> if none.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>ltree[]</type> <literal>?&lt;@</literal> <type>ltree</type>
        <returnvalue>ltree</returnvalue>
       </para>
       <para>
        Returns first array entry that is a descendant of <type>ltree</type>,
        or <literal>NULL</literal> if none.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>ltree[]</type> <literal>?~</literal> <type>lquery</type>
        <returnvalue>ltree</returnvalue>
       </para>
       <para>
        Returns first array entry that matches <type>lquery</type>,
        or <literal>NULL</literal> if none.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>ltree[]</type> <literal>?@</literal> <type>ltxtquery</type>
        <returnvalue>ltree</returnvalue>
       </para>
       <para>
        Returns first array entry that matches <type>ltxtquery</type>,
        or <literal>NULL</literal> if none.
       </para></entry>
      </row>
     </tbody>
    </tgroup>
  </table>

  <para>
   The operators <literal>&lt;@</literal>, <literal>@&gt;</literal>,
   <literal>@</literal> and <literal>~</literal> have analogues
   <literal>^&lt;@</literal>, <literal>^@&gt;</literal>, <literal>^@</literal>,
   <literal>^~</literal>, which are the same except they do not use
   indexes.  These are useful only for testing purposes.
  </para>

  <para>
   The available functions are

Title: ltree Array Operators and Functions
Summary
The ltree data type supports various array operators and functions for comparing, matching, and retrieving hierarchical data, including checking for containment, matching lquery patterns, and retrieving specific entries, with both indexed and non-indexed variants available for testing purposes.