GiST support for inet datatypes

From: Emre Hasegeli <emre(at)hasegeli(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: GiST support for inet datatypes
Date: 2013-12-17 18:58:13
Message-ID: CAE2gYzyUESd188j0b290Gf16502H9B-LwNRS3rFi1SwDb9Qcgw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Attached patch adds GiST support to the inet datatypes with two new
operators. Overlaps operator can be used with exclusion constraints.
Is adjacent to operator is just the negator of it. Index uses only
the network bits of the addresses. Except for the new operators and
is contained within, contains; basic comparison operators are also
supported.

Query planner never chooses to use the index for the operators which
the index is particularly useful because selectivity estimation functions
are missing. I am planning to work on them.

I also wanted to add strictly left of and strictly right of operators
but I did not want to introduce new symbols. I think we need style
guidelines for them. Range types use <@ and @> for is contained within
and contains operators; << and >> for strictly left of and strictly right of
operators. It would be nice if we could change the symbols for contains
and is contained within operators of the inet datatypes. Then we could
use the old ones for strictly left of and strictly right of operators.

I did not touch opr_sanity regression tests as I did not decide
how to solve these problems. I did not add documentation except
the new operators. It would be nice to mention the index and exclusion
constraints for inet datatypes somewhere. I did not know which page
would be more suitable.

Attachment Content-Type Size
inet-gist-v1.patch application/octet-stream 39.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Adrian Klaver 2013-12-17 19:01:22 Re: SSL: better default ciphersuite
Previous Message Heikki Linnakangas 2013-12-17 18:52:21 Re: Extension Templates S03E11