Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf23a563

Browse files
committed
Add an in-core GiST index opclass for inet/cidr types.
This operator class can accelerate subnet/supernet tests as well asbtree-equivalent ordered comparisons. It also handles a new networkoperator inet && inet (overlaps, a/k/a "is supernet or subnet of"),which is expected to be useful in exclusion constraints.Ideally this opclass would be the default for GiST with inet/cidr data,but we can't mark it that way until we figure out how to do a more orless graceful transition from the current situation, in which thereally-completely-bogus inet/cidr opclasses in contrib/btree_gist aremarked as default. Having the opclass in core and not default is betterthan not having it at all, though.While at it, add new documentation sections to allow us to officiallydocument GiST/GIN/SP-GiST opclasses, something there was never a clearplace to do before. I filled these in with some simple tables listingthe existing opclasses and the operators they support, but there'scertainly scope to put more information there.Emre Hasegeli, reviewed by Andreas Karlsson, further hacking by me
1 parent02f6561 commitf23a563

File tree

21 files changed

+1839
-89
lines changed

21 files changed

+1839
-89
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8434,8 +8434,9 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
84348434
<xref linkend="cidr-inet-operators-table"> shows the operators
84358435
available for the <type>cidr</type> and <type>inet</type> types.
84368436
The operators <literal>&lt;&lt;</literal>,
8437-
<literal>&lt;&lt;=</literal>, <literal>&gt;&gt;</literal>, and
8438-
<literal>&gt;&gt;=</literal> test for subnet inclusion. They
8437+
<literal>&lt;&lt;=</literal>, <literal>&gt;&gt;</literal>,
8438+
<literal>&gt;&gt;=</literal>, and <literal>&amp;&amp;</literal>
8439+
test for subnet inclusion. They
84398440
consider only the network parts of the two addresses (ignoring any
84408441
host part) and determine whether one network is identical to
84418442
or a subnet of the other.
@@ -8484,12 +8485,12 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
84848485
</row>
84858486
<row>
84868487
<entry> <literal>&lt;&lt;</literal> </entry>
8487-
<entry>is containedwithin</entry>
8488+
<entry>is containedby</entry>
84888489
<entry><literal>inet '192.168.1.5' &lt;&lt; inet '192.168.1/24'</literal></entry>
84898490
</row>
84908491
<row>
84918492
<entry> <literal>&lt;&lt;=</literal> </entry>
8492-
<entry>is containedwithin or equals</entry>
8493+
<entry>is containedby or equals</entry>
84938494
<entry><literal>inet '192.168.1/24' &lt;&lt;= inet '192.168.1/24'</literal></entry>
84948495
</row>
84958496
<row>
@@ -8502,6 +8503,11 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
85028503
<entry>contains or equals</entry>
85038504
<entry><literal>inet '192.168.1/24' &gt;&gt;= inet '192.168.1/24'</literal></entry>
85048505
</row>
8506+
<row>
8507+
<entry> <literal>&amp;&amp;</literal> </entry>
8508+
<entry>contains or is contained by</entry>
8509+
<entry><literal>inet '192.168.1/24' &amp;&amp; inet '192.168.1.80/28'</literal></entry>
8510+
</row>
85058511
<row>
85068512
<entry> <literal>~</literal> </entry>
85078513
<entry>bitwise NOT</entry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp