1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-08 06:02:22 +03:00

Implement operators for checking if the range contains a multirange

We have operators for checking if the multirange contains a range but don't
have the opposite.  This commit improves completeness of the operator set by
adding two new operators: @> (anyrange,anymultirange) and
<@(anymultirange,anyrange).

Catversion is bumped.
This commit is contained in:
Alexander Korotkov
2020-12-29 23:35:33 +03:00
parent a5b81b6f00
commit 4d7684cc75
9 changed files with 381 additions and 3 deletions

View File

@@ -18182,6 +18182,20 @@ SELECT NULLIF(value, '(none)') ...
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>anyrange</type> <literal>@&gt;</literal> <type>anymultirange</type>
<returnvalue>boolean</returnvalue>
</para>
<para>
Does the range contain the multirange?
</para>
<para>
<literal>'[2,4)'::int4range @&gt; '{[2,3)}'::int4multirange</literal>
<returnvalue>t</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>anymultirange</type> <literal>&lt;@</literal> <type>anymultirange</type>