</refsection>
</refentry>
+ <refentry id="overlaps_geometry_box2df">
+ <refnamediv>
+ <refname>&&(geometry,box2df)</refname>
+
+ <refpurpose>Returns <varname>TRUE</varname> if a geometry's (cached) 2D bounding box intersects a 2D float precision bounding box (BOX2DF).</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>boolean <function>&&</function></funcdef>
+
+ <paramdef>
+ <type>geometry </type>
+
+ <parameter>A</parameter>
+ </paramdef>
+
+ <paramdef>
+ <type>box2df</type>
+
+ <parameter>B</parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>The <varname>&&</varname> operator returns <varname>TRUE</varname> if the cached 2D bounding box of geometry A intersects the 2D bounding box B, using float precision. This means that if B is a (double precision) box2d, it will be internally converted to a float precision 2D bounding box (BOX2DF)</para>
+
+ <note><para>This operand is intended to be used internally by BRIN indexes, more
+ than by users.</para></note>
+
+ <para>Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced.</para>
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting>SELECT ST_MakePoint(1,1) && ST_MakeBox2D(ST_MakePoint(0,0), ST_MakePoint(2,2)) AS overlaps;
+
+ overlaps
+----------
+ t
+(1 row)</programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+
+ <para>
+ <xref linkend="overlaps_box2df_geometry" />,
+ <xref linkend="overlaps_box2df_box2df" />,
+ <xref linkend="contains_geometry_box2df" />,
+ <xref linkend="contains_box2df_geometry" />,
+ <xref linkend="contains_box2df_box2df" />,
+ <xref linkend="is_contained_geometry_box2df" />,
+ <xref linkend="is_contained_box2df_geometry" />,
+ <xref linkend="is_contained_box2df_box2df" /></para>
+ </refsection>
+ </refentry>
+
+ <refentry id="overlaps_box2df_geometry">
+ <refnamediv>
+ <refname>&&(box2df,geometry)</refname>
+
+ <refpurpose>Returns <varname>TRUE</varname> if a 2D float precision bounding box (BOX2DF) intersects a geometry's (cached) 2D bounding box.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>boolean <function>&&</function></funcdef>
+
+ <paramdef>
+ <type>box2df </type>
+
+ <parameter>A</parameter>
+ </paramdef>
+
+ <paramdef>
+ <type>geometry </type>
+
+ <parameter>B</parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>The <varname>&&</varname> operator returns <varname>TRUE</varname> if the 2D bounding box A intersects the cached 2D bounding box of geometry B, using float precision. This means that if A is a (double precision) box2d, it will be internally converted to a float precision 2D bounding box (BOX2DF)</para>
+
+ <note><para>This operand is intended to be used internally by BRIN indexes, more
+ than by users.</para></note>
+
+ <para>Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced.</para>
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting>SELECT ST_MakeBox2D(ST_MakePoint(0,0), ST_MakePoint(2,2)) && ST_MakePoint(1,1) AS overlaps;
+
+ overlaps
+----------
+ t
+(1 row)</programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+
+ <para>
+ <xref linkend="overlaps_geometry_box2df" />,
+ <xref linkend="overlaps_box2df_box2df" />,
+ <xref linkend="contains_geometry_box2df" />,
+ <xref linkend="contains_box2df_geometry" />,
+ <xref linkend="contains_box2df_box2df" />,
+ <xref linkend="is_contained_geometry_box2df" />,
+ <xref linkend="is_contained_box2df_geometry" />,
+ <xref linkend="is_contained_box2df_box2df" /></para>
+ </refsection>
+ </refentry>
+
+ <refentry id="overlaps_box2df_box2df">
+ <refnamediv>
+ <refname>&&(box2df,box2df)</refname>
+
+ <refpurpose>Returns <varname>TRUE</varname> if two 2D float precision bounding boxes (BOX2DF) intersect each other.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>boolean <function>&&</function></funcdef>
+
+ <paramdef>
+ <type>box2df </type>
+
+ <parameter>A</parameter>
+ </paramdef>
+
+ <paramdef>
+ <type>box2df </type>
+
+ <parameter>B</parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>The <varname>&&</varname> operator returns <varname>TRUE</varname> if two 2D bounding boxes A and B intersect each other, using float precision. This means that if A (or B) is a (double precision) box2d, it will be internally converted to a float precision 2D bounding box (BOX2DF)</para>
+
+ <note><para>This operator is intended to be used internally by BRIN indexes, more
+ than by users.</para></note>
+
+ <para>Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced.</para>
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting>SELECT ST_MakeBox2D(ST_MakePoint(0,0), ST_MakePoint(2,2)) && ST_MakeBox2D(ST_MakePoint(1,1), ST_MakePoint(3,3)) AS overlaps;
+
+ overlaps
+----------
+ t
+(1 row)</programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+
+ <para>
+ <xref linkend="overlaps_geometry_box2df" />,
+ <xref linkend="overlaps_box2df_geometry" />,
+ <xref linkend="contains_geometry_box2df" />,
+ <xref linkend="contains_box2df_geometry" />,
+ <xref linkend="contains_box2df_box2df" />,
+ <xref linkend="is_contained_geometry_box2df" />,
+ <xref linkend="is_contained_box2df_geometry" />,
+ <xref linkend="is_contained_box2df_box2df" /></para>
+ </refsection>
+ </refentry>
+
<refentry id="geometry_overlaps_nd">
<refnamediv>
<refname>&&&</refname>
</refsection>
</refentry>
+ <refentry id="overlaps_nd_geometry_gidx">
+ <refnamediv>
+ <refname>&&&(geometry,gidx)</refname>
+
+ <refpurpose>Returns <varname>TRUE</varname> if a geometry's (cached) n-D bounding box intersects a n-D float precision bounding box (GIDX).</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>boolean <function>&&&</function></funcdef>
+
+ <paramdef>
+ <type>geometry </type>
+
+ <parameter>A</parameter>
+ </paramdef>
+
+ <paramdef>
+ <type>gidx </type>
+
+ <parameter>B</parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>The <varname>&&&</varname> operator returns <varname>TRUE</varname> if the cached n-D bounding box of geometry A intersects the n-D bounding box B, using float precision. This means that if B is a (double precision) box3d, it will be internally converted to a float precision 3D bounding box (GIDX)</para>
+
+ <note><para>This operator is intended to be used internally by BRIN indexes, more
+ than by users.</para></note>
+
+ <para>Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced.</para>
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
+ <para>&T_support;</para>
+ <para>&Z_support;</para>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting>SELECT ST_MakePoint(1,1,1) &&& ST_3DMakeBox(ST_MakePoint(0,0,0), ST_MakePoint(2,2,2)) AS overlaps;
+
+ overlaps
+----------
+ t
+(1 row)</programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+
+ <para>
+ <xref linkend="overlaps_nd_gidx_geometry" />,
+ <xref linkend="overlaps_nd_gidx_gidx" /></para>
+ </refsection>
+ </refentry>
+
+ <refentry id="overlaps_nd_gidx_geometry">
+ <refnamediv>
+ <refname>&&&(gidx,geometry)</refname>
+
+ <refpurpose>Returns <varname>TRUE</varname> if a n-D float precision bounding box (GIDX) intersects a geometry's (cached) n-D bounding box.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>boolean <function>&&&</function></funcdef>
+
+ <paramdef>
+ <type>gidx </type>
+
+ <parameter>A</parameter>
+ </paramdef>
+
+ <paramdef>
+ <type>geometry </type>
+
+ <parameter>B</parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>The <varname>&&&</varname> operator returns <varname>TRUE</varname> if the n-D bounding box A intersects the cached n-D bounding box of geometry B, using float precision. This means that if A is a (double precision) box3d, it will be internally converted to a float precision 3D bounding box (GIDX)</para>
+
+ <note><para>This operator is intended to be used internally by BRIN indexes, more
+ than by users.</para></note>
+
+ <para>Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced.</para>
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
+ <para>&T_support;</para>
+ <para>&Z_support;</para>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting>SELECT ST_3DMakeBox(ST_MakePoint(0,0,0), ST_MakePoint(2,2,2)) &&& ST_MakePoint(1,1,1) AS overlaps;
+
+ overlaps
+----------
+ t
+(1 row)</programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+
+ <para>
+ <xref linkend="overlaps_nd_geometry_gidx" />,
+ <xref linkend="overlaps_nd_gidx_gidx" /></para>
+ </refsection>
+ </refentry>
+
+ <refentry id="overlaps_nd_gidx_gidx">
+ <refnamediv>
+ <refname>&&&(gidx,gidx)</refname>
+
+ <refpurpose>Returns <varname>TRUE</varname> if two n-D float precision bounding boxes (GIDX) intersect each other.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>boolean <function>&&&</function></funcdef>
+
+ <paramdef>
+ <type>gidx </type>
+
+ <parameter>A</parameter>
+ </paramdef>
+
+ <paramdef>
+ <type>gidx </type>
+
+ <parameter>B</parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>The <varname>&&&</varname> operator returns <varname>TRUE</varname> if two n-D bounding boxes A and B intersect each other, using float precision. This means that if A (or B) is a (double precision) box3d, it will be internally converted to a float precision 3D bounding box (GIDX)</para>
+
+ <note><para>This operator is intended to be used internally by BRIN indexes, more
+ than by users.</para></note>
+
+ <para>Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced.</para>
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
+ <para>&T_support;</para>
+ <para>&Z_support;</para>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting>SELECT ST_3DMakeBox(ST_MakePoint(0,0,0), ST_MakePoint(2,2,2)) &&& ST_3DMakeBox(ST_MakePoint(1,1,1), ST_MakePoint(3,3,3)) AS overlaps;
+
+ overlaps
+----------
+ t
+(1 row)</programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+
+ <para>
+ <xref linkend="overlaps_nd_geometry_gidx" />,
+ <xref linkend="overlaps_nd_gidx_geometry" /></para>
+ </refsection>
+ </refentry>
+
<refentry id="ST_Geometry_Overleft">
<refnamediv>
<refname>&<</refname>
linkend="ST_Equals" /></para>
</warning>
- <caution><para>This operand will NOT make use of any indexes that may be available on the
- geometries.</para></caution>
+ <caution><para>This operand will NOT make use of any indexes that may be available on the
+ geometries.</para></caution>
+
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
+ <para>Changed: 2.0.0 , the bounding box of geometries was changed to use double precision instead of float4 precision of
+ prior. The side effect of this is that in particular points in prior versions that were a little different may have returned
+ true in prior versions and false in 2.0+ since their float4 boxes would be the same but there float8 (double precision), would be
+ different.</para>
+
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting>SELECT 'LINESTRING(0 0, 0 1, 1 0)'::geometry = 'LINESTRING(1 1, 0 0)'::geometry;
+ ?column?
+----------
+ t
+(1 row)
+
+SELECT ST_AsText(column1)
+FROM ( VALUES
+ ('LINESTRING(0 0, 1 1)'::geometry),
+ ('LINESTRING(1 1, 0 0)'::geometry)) AS foo;
+ st_astext
+---------------------
+ LINESTRING(0 0,1 1)
+ LINESTRING(1 1,0 0)
+(2 rows)
+
+-- Note: the GROUP BY uses the "=" to compare for geometry equivalency.
+SELECT ST_AsText(column1)
+FROM ( VALUES
+ ('LINESTRING(0 0, 1 1)'::geometry),
+ ('LINESTRING(1 1, 0 0)'::geometry)) AS foo
+GROUP BY column1;
+ st_astext
+---------------------
+ LINESTRING(0 0,1 1)
+(1 row)
+
+-- In versions prior to 2.0, this used to return true --
+ SELECT ST_GeomFromText('POINT(1707296.37 4820536.77)') =
+ ST_GeomFromText('POINT(1707296.27 4820536.87)') As pt_intersect;
+
+--pt_intersect --
+f
+</programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+
+ <para><xref linkend="ST_Equals" />, <xref linkend="ST_OrderingEquals" />
+ <!--, <xref linkend="ST_Geometry_LT" />, <xref linkend="ST_Geometry_GT" /> --></para>
+ </refsection>
+ </refentry>
+
+ <refentry id="ST_Geometry_Right">
+ <refnamediv>
+ <refname>>></refname>
+
+ <refpurpose>Returns <varname>TRUE</varname> if A's bounding box is strictly to the right of B's.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <!-- TODO: Ideally, it would be nice if this could be reordered to
+ "boolean (geometry A >> geometry B)" instead of
+ "boolean >>( geometry A, geometry B)" -->
+ <funcdef>boolean <function>>></function></funcdef>
+
+ <paramdef>
+ <type>geometry </type>
+
+ <parameter>A</parameter>
+ </paramdef>
+
+ <paramdef>
+ <type>geometry </type>
+
+ <parameter>B</parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>The <varname>>></varname> operator returns <varname>TRUE</varname> if the bounding box of geometry A
+ is strictly to the right of the bounding box of geometry B.</para>
+
+ <note><para>This operand will make use of any indexes that may be available on the
+ geometries.</para></note>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting>SELECT tbl1.column1, tbl2.column1, tbl1.column2 >> tbl2.column2 AS right
+FROM
+ ( VALUES
+ (1, 'LINESTRING (2 3, 5 6)'::geometry)) AS tbl1,
+ ( VALUES
+ (2, 'LINESTRING (1 4, 1 7)'::geometry),
+ (3, 'LINESTRING (6 1, 6 5)'::geometry),
+ (4, 'LINESTRING (0 0, 4 3)'::geometry)) AS tbl2;
+
+ column1 | column1 | right
+---------+---------+-------
+ 1 | 2 | t
+ 1 | 3 | f
+ 1 | 4 | f
+(3 rows)</programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+
+ <para><xref linkend="ST_Geometry_Left" />, <xref linkend="ST_Geometry_Above" />, <xref linkend="ST_Geometry_Below" /></para>
+ </refsection>
+ </refentry>
+
+ <refentry id="ST_Geometry_Contained">
+ <refnamediv>
+ <refname>@</refname>
+
+ <refpurpose>Returns <varname>TRUE</varname> if A's bounding box is contained by B's.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <!-- TODO: Ideally, it would be nice if this could be reordered to
+ "boolean (geometry A @ geometry B)" instead of
+ "boolean @( geometry A, geometry B)" -->
+ <funcdef>boolean <function>@</function></funcdef>
+
+ <paramdef>
+ <type>geometry </type>
+
+ <parameter>A</parameter>
+ </paramdef>
+
+ <paramdef>
+ <type>geometry </type>
+
+ <parameter>B</parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>The <varname>@</varname> operator returns <varname>TRUE</varname> if the bounding box of geometry A is completely
+ contained by the bounding box of geometry B.</para>
+
+ <note>
+ <para>This operand will make use of any indexes that may be available on the
+ geometries.</para>
+ </note>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting>SELECT tbl1.column1, tbl2.column1, tbl1.column2 @ tbl2.column2 AS contained
+FROM
+ ( VALUES
+ (1, 'LINESTRING (1 1, 3 3)'::geometry)) AS tbl1,
+ ( VALUES
+ (2, 'LINESTRING (0 0, 4 4)'::geometry),
+ (3, 'LINESTRING (2 2, 4 4)'::geometry),
+ (4, 'LINESTRING (1 1, 3 3)'::geometry)) AS tbl2;
+
+ column1 | column1 | contained
+---------+---------+-----------
+ 1 | 2 | t
+ 1 | 3 | f
+ 1 | 4 | t
+(3 rows)</programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+
+ <para><xref linkend="ST_Geometry_Contain" />, <xref linkend="geometry_overlaps" /></para>
+ </refsection>
+ </refentry>
+
+ <refentry id="is_contained_geometry_box2df">
+ <refnamediv>
+ <refname>@(geometry,box2df)</refname>
+
+ <refpurpose>Returns <varname>TRUE</varname> if a geometry's 2D bounding box is contained into a 2D float precision bounding box (BOX2DF).</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>boolean <function>@</function></funcdef>
+
+ <paramdef>
+ <type>geometry </type>
+
+ <parameter>A</parameter>
+ </paramdef>
+
+ <paramdef>
+ <type>box2df </type>
+
+ <parameter>B</parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>The <varname>@</varname> operator returns <varname>TRUE</varname> if the A geometry's 2D bounding box is contained the 2D bounding box B, using float precision. This means that if B is a (double precision) box2d, it will be internally converted to a float precision 2D bounding box (BOX2DF)</para>
+ <note><para>This operand is intended to be used internally by BRIN indexes, more
+ than by users.</para></note>
+
+ <para>Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced.</para>
<para>&curve_support;</para>
<para>&P_support;</para>
- <para>Changed: 2.0.0 , the bounding box of geometries was changed to use double precision instead of float4 precision of
- prior. The side effect of this is that in particular points in prior versions that were a little different may have returned
- true in prior versions and false in 2.0+ since their float4 boxes would be the same but there float8 (double precision), would be
- different.</para>
-
</refsection>
<refsection>
<title>Examples</title>
- <programlisting>SELECT 'LINESTRING(0 0, 0 1, 1 0)'::geometry = 'LINESTRING(1 1, 0 0)'::geometry;
- ?column?
-----------
- t
-(1 row)
-
-SELECT ST_AsText(column1)
-FROM ( VALUES
- ('LINESTRING(0 0, 1 1)'::geometry),
- ('LINESTRING(1 1, 0 0)'::geometry)) AS foo;
- st_astext
----------------------
- LINESTRING(0 0,1 1)
- LINESTRING(1 1,0 0)
-(2 rows)
-
--- Note: the GROUP BY uses the "=" to compare for geometry equivalency.
-SELECT ST_AsText(column1)
-FROM ( VALUES
- ('LINESTRING(0 0, 1 1)'::geometry),
- ('LINESTRING(1 1, 0 0)'::geometry)) AS foo
-GROUP BY column1;
- st_astext
----------------------
- LINESTRING(0 0,1 1)
-(1 row)
-
--- In versions prior to 2.0, this used to return true --
- SELECT ST_GeomFromText('POINT(1707296.37 4820536.77)') =
- ST_GeomFromText('POINT(1707296.27 4820536.87)') As pt_intersect;
+ <programlisting>SELECT ST_Buffer(ST_GeomFromText('POINT(2 2)'), 1) @ ST_MakeBox2D(ST_MakePoint(0,0), ST_MakePoint(5,5)) AS is_contained;
---pt_intersect --
-f
-</programlisting>
+ is_contained
+--------------
+ t
+(1 row)</programlisting>
</refsection>
<refsection>
<title>See Also</title>
- <para><xref linkend="ST_Equals" />, <xref linkend="ST_OrderingEquals" />
- <!--, <xref linkend="ST_Geometry_LT" />, <xref linkend="ST_Geometry_GT" /> --></para>
+ <para>
+ <xref linkend="overlaps_geometry_box2df" />,
+ <xref linkend="overlaps_box2df_geometry" />,
+ <xref linkend="overlaps_box2df_box2df" />,
+ <xref linkend="contains_geometry_box2df" />,
+ <xref linkend="contains_box2df_geometry" />,
+ <xref linkend="contains_box2df_box2df" />,
+ <xref linkend="is_contained_box2df_geometry" />,
+ <xref linkend="is_contained_box2df_box2df" /></para>
</refsection>
</refentry>
- <refentry id="ST_Geometry_Right">
+ <refentry id="is_contained_box2df_geometry">
<refnamediv>
- <refname>>></refname>
+ <refname>@(box2df,geometry)</refname>
- <refpurpose>Returns <varname>TRUE</varname> if A's bounding box is strictly to the right of B's.</refpurpose>
+ <refpurpose>Returns <varname>TRUE</varname> if a 2D float precision bounding box (BOX2DF) is contained into a geometry's 2D bounding box.</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcprototype>
- <!-- TODO: Ideally, it would be nice if this could be reordered to
- "boolean (geometry A >> geometry B)" instead of
- "boolean >>( geometry A, geometry B)" -->
- <funcdef>boolean <function>>></function></funcdef>
+ <funcdef>boolean <function>@</function></funcdef>
<paramdef>
- <type>geometry </type>
+ <type>box2df </type>
<parameter>A</parameter>
</paramdef>
<refsection>
<title>Description</title>
- <para>The <varname>>></varname> operator returns <varname>TRUE</varname> if the bounding box of geometry A
- is strictly to the right of the bounding box of geometry B.</para>
+ <para>The <varname>@</varname> operator returns <varname>TRUE</varname> if the 2D bounding box A is contained into the B geometry's 2D bounding box, using float precision. This means that if B is a (double precision) box2d, it will be internally converted to a float precision 2D bounding box (BOX2DF)</para>
- <note><para>This operand will make use of any indexes that may be available on the
- geometries.</para></note>
+ <note><para>This operand is intended to be used internally by BRIN indexes, more
+ than by users.</para></note>
+
+ <para>Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced.</para>
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
</refsection>
<refsection>
<title>Examples</title>
- <programlisting>SELECT tbl1.column1, tbl2.column1, tbl1.column2 >> tbl2.column2 AS right
-FROM
- ( VALUES
- (1, 'LINESTRING (2 3, 5 6)'::geometry)) AS tbl1,
- ( VALUES
- (2, 'LINESTRING (1 4, 1 7)'::geometry),
- (3, 'LINESTRING (6 1, 6 5)'::geometry),
- (4, 'LINESTRING (0 0, 4 3)'::geometry)) AS tbl2;
+ <programlisting>SELECT ST_MakeBox2D(ST_MakePoint(2,2), ST_MakePoint(3,3)) @ ST_Buffer(ST_GeomFromText('POINT(1 1)'), 10) AS is_contained;
- column1 | column1 | right
----------+---------+-------
- 1 | 2 | t
- 1 | 3 | f
- 1 | 4 | f
-(3 rows)</programlisting>
+ is_contained
+--------------
+ t
+(1 row)</programlisting>
</refsection>
<refsection>
<title>See Also</title>
- <para><xref linkend="ST_Geometry_Left" />, <xref linkend="ST_Geometry_Above" />, <xref linkend="ST_Geometry_Below" /></para>
+ <para>
+ <xref linkend="overlaps_geometry_box2df" />,
+ <xref linkend="overlaps_box2df_geometry" />,
+ <xref linkend="overlaps_box2df_box2df" />,
+ <xref linkend="contains_geometry_box2df" />,
+ <xref linkend="contains_box2df_geometry" />,
+ <xref linkend="contains_box2df_box2df" />,
+ <xref linkend="is_contained_geometry_box2df" />,
+ <xref linkend="is_contained_box2df_box2df" /></para>
</refsection>
</refentry>
- <refentry id="ST_Geometry_Contained">
+ <refentry id="is_contained_box2df_box2df">
<refnamediv>
- <refname>@</refname>
+ <refname>@(box2df,box2df)</refname>
- <refpurpose>Returns <varname>TRUE</varname> if A's bounding box is contained by B's.</refpurpose>
+ <refpurpose>Returns <varname>TRUE</varname> if a 2D float precision bounding box (BOX2DF) is contained into another 2D float precision bounding box.</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcprototype>
- <!-- TODO: Ideally, it would be nice if this could be reordered to
- "boolean (geometry A @ geometry B)" instead of
- "boolean @( geometry A, geometry B)" -->
<funcdef>boolean <function>@</function></funcdef>
<paramdef>
- <type>geometry </type>
+ <type>box2df </type>
<parameter>A</parameter>
</paramdef>
<paramdef>
- <type>geometry </type>
+ <type>box2df </type>
<parameter>B</parameter>
</paramdef>
<refsection>
<title>Description</title>
- <para>The <varname>@</varname> operator returns <varname>TRUE</varname> if the bounding box of geometry A is completely
- contained by the bounding box of geometry B.</para>
+ <para>The <varname>@</varname> operator returns <varname>TRUE</varname> if the 2D bounding box A is contained into the 2D bounding box B, using float precision. This means that if A (or B) is a (double precision) box2d, it will be internally converted to a float precision 2D bounding box (BOX2DF)</para>
- <note>
- <para>This operand will make use of any indexes that may be available on the
- geometries.</para>
- </note>
+ <note><para>This operand is intended to be used internally by BRIN indexes, more
+ than by users.</para></note>
+
+ <para>Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced.</para>
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
</refsection>
<refsection>
<title>Examples</title>
- <programlisting>SELECT tbl1.column1, tbl2.column1, tbl1.column2 @ tbl2.column2 AS contained
-FROM
- ( VALUES
- (1, 'LINESTRING (1 1, 3 3)'::geometry)) AS tbl1,
- ( VALUES
- (2, 'LINESTRING (0 0, 4 4)'::geometry),
- (3, 'LINESTRING (2 2, 4 4)'::geometry),
- (4, 'LINESTRING (1 1, 3 3)'::geometry)) AS tbl2;
+ <programlisting>SELECT ST_MakeBox2D(ST_MakePoint(2,2), ST_MakePoint(3,3)) @ ST_MakeBox2D(ST_MakePoint(0,0), ST_MakePoint(5,5)) AS is_contained;
- column1 | column1 | contained
----------+---------+-----------
- 1 | 2 | t
- 1 | 3 | f
- 1 | 4 | t
-(3 rows)</programlisting>
+ is_contained
+--------------
+ t
+(1 row)</programlisting>
</refsection>
<refsection>
<title>See Also</title>
- <para><xref linkend="ST_Geometry_Contain" />, <xref linkend="geometry_overlaps" /></para>
+ <para>
+ <xref linkend="overlaps_geometry_box2df" />,
+ <xref linkend="overlaps_box2df_geometry" />,
+ <xref linkend="overlaps_box2df_box2df" />,
+ <xref linkend="contains_geometry_box2df" />,
+ <xref linkend="contains_box2df_geometry" />,
+ <xref linkend="contains_box2df_box2df" />,
+ <xref linkend="is_contained_geometry_box2df" />,
+ <xref linkend="is_contained_box2df_geometry" /></para>
</refsection>
</refentry>
</refsection>
</refentry>
+ <refentry id="contains_geometry_box2df">
+ <refnamediv>
+ <refname>~(geometry,box2df)</refname>
+
+ <refpurpose>Returns <varname>TRUE</varname> if a geometry's 2D bonding box contains a 2D float precision bounding box (GIDX).</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>boolean <function>~</function></funcdef>
+
+ <paramdef>
+ <type>geometry </type>
+
+ <parameter>A</parameter>
+ </paramdef>
+
+ <paramdef>
+ <type>box2df </type>
+
+ <parameter>B</parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>The <varname>~</varname> operator returns <varname>TRUE</varname> if the 2D bounding box of a geometry A contains the 2D bounding box B, using float precision. This means that if B is a (double precision) box2d, it will be internally converted to a float precision 2D bounding box (BOX2DF)</para>
+
+ <note><para>This operand is intended to be used internally by BRIN indexes, more
+ than by users.</para></note>
+
+ <para>Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced.</para>
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting>SELECT ST_Buffer(ST_GeomFromText('POINT(1 1)'), 10) ~ ST_MakeBox2D(ST_MakePoint(0,0), ST_MakePoint(2,2)) AS contains;
+
+ contains
+----------
+ t
+(1 row)</programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+
+ <para>
+ <xref linkend="overlaps_geometry_box2df" />,
+ <xref linkend="overlaps_box2df_geometry" />,
+ <xref linkend="overlaps_box2df_box2df" />,
+ <xref linkend="contains_box2df_geometry" />,
+ <xref linkend="contains_box2df_box2df" />,
+ <xref linkend="is_contained_geometry_box2df" />,
+ <xref linkend="is_contained_box2df_geometry" />,
+ <xref linkend="is_contained_box2df_box2df" /></para>
+ </refsection>
+ </refentry>
+
+ <refentry id="contains_box2df_geometry">
+ <refnamediv>
+ <refname>~(box2df,geometry)</refname>
+
+ <refpurpose>Returns <varname>TRUE</varname> if a 2D float precision bounding box (BOX2DF) contains a geometry's 2D bonding box.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>boolean <function>~</function></funcdef>
+
+ <paramdef>
+ <type>box2df </type>
+
+ <parameter>A</parameter>
+ </paramdef>
+
+ <paramdef>
+ <type>geometry </type>
+
+ <parameter>B</parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>The <varname>~</varname> operator returns <varname>TRUE</varname> if the 2D bounding box A contains the B geometry's bounding box, using float precision. This means that if A is a (double precision) box2d, it will be internally converted to a float precision 2D bounding box (BOX2DF)</para>
+
+ <note><para>This operand is intended to be used internally by BRIN indexes, more
+ than by users.</para></note>
+
+ <para>Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced.</para>
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting>SELECT ST_MakeBox2D(ST_MakePoint(0,0), ST_MakePoint(5,5)) ~ ST_Buffer(ST_GeomFromText('POINT(2 2)'), 1) AS contains;
+
+ contains
+----------
+ t
+(1 row)</programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+
+ <para>
+ <xref linkend="overlaps_geometry_box2df" />,
+ <xref linkend="overlaps_box2df_geometry" />,
+ <xref linkend="overlaps_box2df_box2df" />,
+ <xref linkend="contains_geometry_box2df" />,
+ <xref linkend="contains_box2df_box2df" />,
+ <xref linkend="is_contained_geometry_box2df" />,
+ <xref linkend="is_contained_box2df_geometry" />,
+ <xref linkend="is_contained_box2df_box2df" /></para>
+ </refsection>
+ </refentry>
+
+ <refentry id="contains_box2df_box2df">
+ <refnamediv>
+ <refname>~(box2df,box2df)</refname>
+
+ <refpurpose>Returns <varname>TRUE</varname> if a 2D float precision bounding box (BOX2DF) contains another 2D float precision bounding box (BOX2DF).</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>boolean <function>~</function></funcdef>
+
+ <paramdef>
+ <type>box2df </type>
+
+ <parameter>A</parameter>
+ </paramdef>
+
+ <paramdef>
+ <type>box2df </type>
+
+ <parameter>B</parameter>
+ </paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>The <varname>~</varname> operator returns <varname>TRUE</varname> if the 2D bounding box A contains the 2D bounding box B, using float precision. This means that if A is a (double precision) box2d, it will be internally converted to a float precision 2D bounding box (BOX2DF)</para>
+
+ <note><para>This operand is intended to be used internally by BRIN indexes, more
+ than by users.</para></note>
+
+ <para>Availability: 2.3.0 support for Block Range INdexes (BRIN) was introduced.</para>
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting>SELECT ST_MakeBox2D(ST_MakePoint(0,0), ST_MakePoint(5,5)) ~ ST_MakeBox2D(ST_MakePoint(2,2), ST_MakePoint(3,3)) AS contains;
+
+ contains
+----------
+ t
+(1 row)</programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+
+ <para>
+ <xref linkend="overlaps_geometry_box2df" />,
+ <xref linkend="overlaps_box2df_geometry" />,
+ <xref linkend="overlaps_box2df_box2df" />,
+ <xref linkend="contains_geometry_box2df" />,
+ <xref linkend="contains_box2df_geometry" />,
+ <xref linkend="is_contained_geometry_box2df" />,
+ <xref linkend="is_contained_box2df_geometry" />,
+ <xref linkend="is_contained_box2df_box2df" /></para>
+ </refsection>
+ </refentry>
+
<refentry id="ST_Geometry_Same">
<refnamediv>
<refname>~=</refname>
FUNCTION 6 geometry_gist_picksplit_2d (internal, internal),
FUNCTION 7 geometry_gist_same_2d (geom1 geometry, geom2 geometry, internal);
-
-----------------------------------------------------------------------------
-- GiST ND GEOMETRY-over-GSERIALIZED
-----------------------------------------------------------------------------
AS 'MODULE_PATHNAME', 'ST_InterpolatePoint'
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
+#if POSTGIS_PGSQL_VERSION > 94
+--------------------------------------------------------------------
+-- BRIN support --
+--------------------------------------------------------------------
+
+---------------------------------
+-- 2d operators --
+---------------------------------
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION contains_2d(box2df, geometry)
+RETURNS boolean
+AS 'MODULE_PATHNAME','gserialized_contains_box2df_geom_2d'
+LANGUAGE 'c' IMMUTABLE STRICT;
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION is_contained_2d(box2df, geometry)
+RETURNS boolean
+AS 'MODULE_PATHNAME','gserialized_within_box2df_geom_2d'
+LANGUAGE 'c' IMMUTABLE STRICT;
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION overlaps_2d(box2df, geometry)
+RETURNS boolean
+AS 'MODULE_PATHNAME','gserialized_overlaps_box2df_geom_2d'
+LANGUAGE 'c' IMMUTABLE STRICT;
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION overlaps_2d(box2df, box2df)
+RETURNS boolean
+AS 'MODULE_PATHNAME','gserialized_contains_box2df_box2df_2d'
+LANGUAGE 'c' IMMUTABLE STRICT;
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION contains_2d(box2df, box2df)
+RETURNS boolean
+AS 'MODULE_PATHNAME','gserialized_contains_box2df_box2df_2d'
+LANGUAGE 'c' IMMUTABLE STRICT;
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION is_contained_2d(box2df, box2df)
+RETURNS boolean
+AS 'MODULE_PATHNAME','gserialized_contains_box2df_box2df_2d'
+LANGUAGE 'c' IMMUTABLE STRICT;
+
+-- Availability: 2.3.0
+CREATE OPERATOR ~ (
+ LEFTARG = box2df,
+ RIGHTARG = geometry,
+ PROCEDURE = contains_2d,
+ COMMUTATOR = @
+);
+
+-- Availability: 2.3.0
+CREATE OPERATOR @ (
+ LEFTARG = box2df,
+ RIGHTARG = geometry,
+ PROCEDURE = is_contained_2d,
+ COMMUTATOR = ~
+);
+
+-- Availability: 2.3.0
+CREATE OPERATOR && (
+ LEFTARG = box2df,
+ RIGHTARG = geometry,
+ PROCEDURE = overlaps_2d,
+ COMMUTATOR = &&
+);
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION contains_2d(geometry, box2df)
+RETURNS boolean
+AS $$
+ SELECT $2 @ $1;
+$$ LANGUAGE SQL IMMUTABLE STRICT;
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION is_contained_2d(geometry, box2df)
+RETURNS boolean
+AS $$
+ SELECT $2 ~ $1;
+$$ LANGUAGE SQL IMMUTABLE STRICT;
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION overlaps_2d(geometry, box2df)
+RETURNS boolean
+AS $$
+ SELECT $2 && $1;
+$$ LANGUAGE SQL IMMUTABLE STRICT;
+
+-- Availability: 2.3.0
+CREATE OPERATOR ~ (
+ LEFTARG = geometry,
+ RIGHTARG = box2df,
+ COMMUTATOR = @,
+ PROCEDURE = contains_2d
+);
+
+-- Availability: 2.3.0
+CREATE OPERATOR @ (
+ LEFTARG = geometry,
+ RIGHTARG = box2df,
+ COMMUTATOR = ~,
+ PROCEDURE = is_contained_2d
+);
+
+-- Availability: 2.3.0
+CREATE OPERATOR && (
+ LEFTARG = geometry,
+ RIGHTARG = box2df,
+ PROCEDURE = overlaps_2d,
+ COMMUTATOR = &&
+);
+
+-- Availability: 2.3.0
+CREATE OPERATOR && (
+ LEFTARG = box2df,
+ RIGHTARG = box2df,
+ PROCEDURE = overlaps_2d,
+ COMMUTATOR = &&
+);
+
+-- Availability: 2.3.0
+CREATE OPERATOR @ (
+ LEFTARG = box2df,
+ RIGHTARG = box2df,
+ PROCEDURE = is_contained_2d,
+ COMMUTATOR = ~
+);
+
+-- Availability: 2.3.0
+CREATE OPERATOR ~ (
+ LEFTARG = box2df,
+ RIGHTARG = box2df,
+ PROCEDURE = contains_2d,
+ COMMUTATOR = @
+);
+
+----------------------------
+-- nd operators --
+----------------------------
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION overlaps_nd(gidx, geometry)
+RETURNS boolean
+AS 'MODULE_PATHNAME','gserialized_gidx_geom_overlaps'
+LANGUAGE 'c' IMMUTABLE STRICT;
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION overlaps_nd(gidx, gidx)
+RETURNS boolean
+AS 'MODULE_PATHNAME','gserialized_gidx_gidx_overlaps'
+LANGUAGE 'c' IMMUTABLE STRICT;
+
+-- Availability: 2.3.0
+CREATE OPERATOR &&& (
+ LEFTARG = gidx,
+ RIGHTARG = geometry,
+ PROCEDURE = overlaps_nd,
+ COMMUTATOR = &&&
+);
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION overlaps_nd(geometry, gidx)
+RETURNS boolean
+AS $$
+ SELECT $2 &&& $1;
+$$ LANGUAGE SQL IMMUTABLE STRICT;
+
+-- Availability: 2.3.0
+CREATE OPERATOR &&& (
+ LEFTARG = geometry,
+ RIGHTARG = gidx,
+ PROCEDURE = overlaps_nd,
+ COMMUTATOR = &&&
+);
+
+-- Availability: 2.3.0
+CREATE OPERATOR &&& (
+ LEFTARG = gidx,
+ RIGHTARG = gidx,
+ PROCEDURE = overlaps_nd,
+ COMMUTATOR = &&&
+);
+
+------------------------------
+-- Create operator families --
+------------------------------
+
+-------------
+-- 2D case --
+-------------
+
+-- Availability: 2.3.0
+CREATE OPERATOR FAMILY brin_geometry_inclusion_ops_2d USING brin;
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION geom2d_brin_inclusion_add_value(internal, internal, internal, internal) RETURNS boolean
+ AS 'MODULE_PATHNAME','geom2d_brin_inclusion_add_value'
+ LANGUAGE 'c';
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION geom3d_brin_inclusion_add_value(internal, internal, internal, internal) RETURNS boolean
+ AS 'MODULE_PATHNAME','geom3d_brin_inclusion_add_value'
+ LANGUAGE 'c';
+
+-- Availability: 2.3.0
+CREATE OR REPLACE FUNCTION geom4d_brin_inclusion_add_value(internal, internal, internal, internal) RETURNS boolean
+ AS 'MODULE_PATHNAME','geom4d_brin_inclusion_add_value'
+ LANGUAGE 'c';
+
+-- Availability: 2.3.0
+CREATE OPERATOR CLASS brin_geometry_inclusion_ops_2d
+ DEFAULT FOR TYPE geometry
+ USING brin
+ FAMILY brin_geometry_inclusion_ops_2d AS
+ OPERATOR 3 &&(geometry, geometry),
+ OPERATOR 7 ~(geometry, geometry),
+ OPERATOR 8 @(geometry, geometry),
+ FUNCTION 1 brin_inclusion_opcinfo(internal) ,
+ FUNCTION 2 geom2d_brin_inclusion_add_value(internal, internal, internal, internal) ,
+ FUNCTION 3 brin_inclusion_consistent(internal, internal, internal) ,
+ FUNCTION 4 brin_inclusion_union(internal, internal, internal) ,
+ STORAGE box2df;
+
+ALTER OPERATOR FAMILY brin_geometry_inclusion_ops_2d USING brin ADD
+ OPERATOR 3 &&(box2df, geometry),
+ OPERATOR 7 ~(box2df, geometry),
+ OPERATOR 8 @(box2df, geometry),
+
+ OPERATOR 3 &&(geometry, box2df),
+ OPERATOR 7 ~(geometry, box2df),
+ OPERATOR 8 @(geometry, box2df),
+
+ OPERATOR 3 &&(box2df, box2df),
+ OPERATOR 7 ~(box2df, box2df),
+ OPERATOR 8 @(box2df, box2df);
+
+-------------
+-- 3D case --
+-------------
+
+-- Availability: 2.3.0
+CREATE OPERATOR FAMILY brin_geometry_inclusion_ops_3d USING brin;
+
+-- Availability: 2.3.0
+CREATE OPERATOR CLASS brin_geometry_inclusion_ops_3d
+ FOR TYPE geometry
+ USING brin
+ FAMILY brin_geometry_inclusion_ops_3d AS
+ OPERATOR 3 &&&(geometry, geometry),
+ FUNCTION 1 brin_inclusion_opcinfo(internal) ,
+ FUNCTION 2 geom3d_brin_inclusion_add_value(internal, internal, internal, internal) ,
+ FUNCTION 3 brin_inclusion_consistent(internal, internal, internal) ,
+ FUNCTION 4 brin_inclusion_union(internal, internal, internal) ,
+ STORAGE gidx;
+
+ALTER OPERATOR FAMILY brin_geometry_inclusion_ops_3d USING brin ADD
+ OPERATOR 3 &&&(gidx, geometry),
+
+ OPERATOR 3 &&&(geometry, gidx),
+
+ OPERATOR 3 &&&(gidx, gidx);
+
+-------------
+-- 4D case --
+-------------
+
+-- Availability: 2.3.0
+CREATE OPERATOR FAMILY brin_geometry_inclusion_ops_4d USING brin;
+
+-- Availability: 2.3.0
+CREATE OPERATOR CLASS brin_geometry_inclusion_ops_4d
+ FOR TYPE geometry
+ USING brin
+ FAMILY brin_geometry_inclusion_ops_4d AS
+ OPERATOR 3 &&&(geometry, geometry),
+ FUNCTION 1 brin_inclusion_opcinfo(internal) ,
+ FUNCTION 2 geom4d_brin_inclusion_add_value(internal, internal, internal, internal) ,
+ FUNCTION 3 brin_inclusion_consistent(internal, internal, internal) ,
+ FUNCTION 4 brin_inclusion_union(internal, internal, internal) ,
+ STORAGE gidx;
+
+ALTER OPERATOR FAMILY brin_geometry_inclusion_ops_4d USING brin ADD
+ OPERATOR 3 &&&(gidx, geometry),
+
+ OPERATOR 3 &&&(geometry, gidx),
+
+ OPERATOR 3 &&&(gidx, gidx);
+
---------------------------------------------------------------
-- END
---------------------------------------------------------------
-
+#endif
---------------------------------------------------------------
-- USER CONTRIBUTED