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.
Description: Binary data
-- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers