Home Explore Blog CI



postgresql

4th chunk of `doc/src/sgml/seg.sgml`
c4d95ec793651340a3da25cda0e22a8e82b8a398615a33f40000000100000989
      <entry role="func_table_entry"><para role="func_signature">
        <type>seg</type> <literal>&lt;&lt;</literal> <type>seg</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Is the first <type>seg</type> entirely to the left of the second?
        [a, b] &lt;&lt; [c, d] is true if b &lt; c.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>seg</type> <literal>&gt;&gt;</literal> <type>seg</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Is the first <type>seg</type> entirely to the right of the second?
        [a, b] &gt;&gt; [c, d] is true if a &gt; d.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>seg</type> <literal>&amp;&lt;</literal> <type>seg</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Does the first <type>seg</type> not extend to the right of the
        second?
        [a, b] &amp;&lt; [c, d] is true if b &lt;= d.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>seg</type> <literal>&amp;&gt;</literal> <type>seg</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Does the first <type>seg</type> not extend to the left of the
        second?
        [a, b] &amp;&gt; [c, d] is true if a &gt;= c.
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>seg</type> <literal>=</literal> <type>seg</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Are the two <type>seg</type>s equal?
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>seg</type> <literal>&amp;&amp;</literal> <type>seg</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Do the two <type>seg</type>s overlap?
       </para></entry>
      </row>

      <row>
       <entry role="func_table_entry"><para role="func_signature">
        <type>seg</type> <literal>@&gt;</literal> <type>seg</type>
        <returnvalue>boolean</returnvalue>
       </para>
       <para>
        Does the first <type>seg</type> contain the second?
      

Title: Seg Operators
Summary
The seg data type supports various operators, including <<, >>, &<, &>, =, &&, and @>, which allow for comparisons between seg values, such as checking if one seg is entirely to the left or right of another, if they overlap, or if one contains the other, and return boolean values based on the comparison results.