summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/catalog/pg_aggregate.h2
-rw-r--r--src/test/regress/expected/inet.out59
2 files changed, 33 insertions, 28 deletions
diff --git a/src/include/catalog/pg_aggregate.h b/src/include/catalog/pg_aggregate.h
index 94e0747d38..e2aac74174 100644
--- a/src/include/catalog/pg_aggregate.h
+++ b/src/include/catalog/pg_aggregate.h
@@ -190,6 +190,7 @@ DATA(insert ( 2050 n 0 array_larger array_larger - - - - f f 1073 22
DATA(insert ( 2244 n 0 bpchar_larger bpchar_larger - - - - f f 1060 1042 1042 0 0 0 _null_ _null_ _null_ ));
DATA(insert ( 2797 n 0 tidlarger tidlarger - - - - f f 2800 27 27 0 0 0 _null_ _null_ _null_ ));
DATA(insert ( 3526 n 0 enum_larger enum_larger - - - - f f 3519 3500 3500 0 0 0 _null_ _null_ _null_ ));
+DATA(insert ( 3564 n 0 network_larger network_larger - - - - f f 1205 869 869 0 0 0 _null_ _null_ _null_ ));
/* min */
DATA(insert ( 2131 n 0 int8smaller int8smaller - - - - f f 412 20 20 0 0 0 _null_ _null_ _null_ ));
@@ -212,6 +213,7 @@ DATA(insert ( 2051 n 0 array_smaller array_smaller - - - - f f 1072
DATA(insert ( 2245 n 0 bpchar_smaller bpchar_smaller - - - - f f 1058 1042 1042 0 0 0 _null_ _null_ _null_ ));
DATA(insert ( 2798 n 0 tidsmaller tidsmaller - - - - f f 2799 27 27 0 0 0 _null_ _null_ _null_ ));
DATA(insert ( 3527 n 0 enum_smaller enum_smaller - - - - f f 3518 3500 3500 0 0 0 _null_ _null_ _null_ ));
+DATA(insert ( 3565 n 0 network_smaller network_smaller - - - - f f 1203 869 869 0 0 0 _null_ _null_ _null_ ));
/* count */
DATA(insert ( 2147 n 0 int8inc_any int8_sum_to_int8 - int8inc_any int8dec_any - f f 0 20 20 0 20 0 "0" _null_ "0" ));
diff --git a/src/test/regress/expected/inet.out b/src/test/regress/expected/inet.out
index 5401152e15..d3b9bd382f 100644
--- a/src/test/regress/expected/inet.out
+++ b/src/test/regress/expected/inet.out
@@ -182,26 +182,26 @@ SELECT '' AS ten, i, c,
i << c AS sb, i <<= c AS sbe,
i >> c AS sup, i >>= c AS spe,
i && c AS ovr
- FROM INET_TBL;
+ FROM INET_TBL ORDER BY i, c;
ten | i | c | lt | le | eq | ge | gt | ne | sb | sbe | sup | spe | ovr
-----+------------------+--------------------+----+----+----+----+----+----+----+-----+-----+-----+-----
- | 192.168.1.226/24 | 192.168.1.0/24 | f | f | f | t | t | t | f | t | f | t | t
- | 192.168.1.226 | 192.168.1.0/26 | f | f | f | t | t | t | f | f | f | f | f
- | 192.168.1.0/24 | 192.168.1.0/24 | f | t | t | t | f | f | f | t | f | t | t
- | 192.168.1.0/25 | 192.168.1.0/24 | f | f | f | t | t | t | t | t | f | f | t
- | 192.168.1.255/24 | 192.168.1.0/24 | f | f | f | t | t | t | f | t | f | t | t
- | 192.168.1.255/25 | 192.168.1.0/24 | f | f | f | t | t | t | t | t | f | f | t
+ | 9.1.2.3/8 | 10.0.0.0/8 | t | t | f | f | f | t | f | f | f | f | f
+ | 10.1.2.3/8 | 10.0.0.0/8 | f | f | f | t | t | t | f | t | f | t | t
| 10.1.2.3/8 | 10.0.0.0/8 | f | f | f | t | t | t | f | t | f | t | t
| 10.1.2.3/8 | 10.0.0.0/32 | t | t | f | f | f | t | f | f | t | t | t
- | 10.1.2.3 | 10.1.2.3/32 | f | t | t | t | f | f | f | t | f | t | t
- | 10.1.2.3/24 | 10.1.2.0/24 | f | f | f | t | t | t | f | t | f | t | t
| 10.1.2.3/16 | 10.1.0.0/16 | f | f | f | t | t | t | f | t | f | t | t
- | 10.1.2.3/8 | 10.0.0.0/8 | f | f | f | t | t | t | f | t | f | t | t
+ | 10.1.2.3/24 | 10.1.2.0/24 | f | f | f | t | t | t | f | t | f | t | t
+ | 10.1.2.3 | 10.1.2.3/32 | f | t | t | t | f | f | f | t | f | t | t
| 11.1.2.3/8 | 10.0.0.0/8 | f | f | f | t | t | t | f | f | f | f | f
- | 9.1.2.3/8 | 10.0.0.0/8 | t | t | f | f | f | t | f | f | f | f | f
+ | 192.168.1.0/24 | 192.168.1.0/24 | f | t | t | t | f | f | f | t | f | t | t
+ | 192.168.1.226/24 | 192.168.1.0/24 | f | f | f | t | t | t | f | t | f | t | t
+ | 192.168.1.255/24 | 192.168.1.0/24 | f | f | f | t | t | t | f | t | f | t | t
+ | 192.168.1.0/25 | 192.168.1.0/24 | f | f | f | t | t | t | t | t | f | f | t
+ | 192.168.1.255/25 | 192.168.1.0/24 | f | f | f | t | t | t | t | t | f | f | t
+ | 192.168.1.226 | 192.168.1.0/26 | f | f | f | t | t | t | f | f | f | f | f
+ | ::4.3.2.1/24 | ::ffff:1.2.3.4/128 | t | t | f | f | f | t | f | f | t | t | t
| 10:23::f1/64 | 10:23::f1/128 | t | t | f | f | f | t | f | f | t | t | t
| 10:23::ffff | 10:23::8000/113 | f | f | f | t | t | t | t | t | f | f | t
- | ::4.3.2.1/24 | ::ffff:1.2.3.4/128 | t | t | f | f | f | t | f | f | t | t | t
(17 rows)
SELECT max(i) AS max, min(i) AS min FROM INET_TBL;
@@ -217,10 +217,15 @@ SELECT max(c) AS max, min(c) AS min FROM INET_TBL;
(1 row)
-- check the conversion to/from text and set_netmask
-SELECT '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL ORDER BY i;
+SELECT '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL;
ten | set_masklen
-----+------------------
- | 9.1.2.3/24
+ | 192.168.1.226/24
+ | 192.168.1.226/24
+ | 192.168.1.0/24
+ | 192.168.1.0/24
+ | 192.168.1.255/24
+ | 192.168.1.255/24
| 10.1.2.3/24
| 10.1.2.3/24
| 10.1.2.3/24
@@ -228,15 +233,10 @@ SELECT '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL ORDER BY i;
| 10.1.2.3/24
| 10.1.2.3/24
| 11.1.2.3/24
- | 192.168.1.0/24
- | 192.168.1.226/24
- | 192.168.1.255/24
- | 192.168.1.0/24
- | 192.168.1.255/24
- | 192.168.1.226/24
- | ::4.3.2.1/24
+ | 9.1.2.3/24
| 10:23::f1/24
| 10:23::ffff/24
+ | ::4.3.2.1/24
(17 rows)
-- check that btree index works correctly
@@ -393,13 +393,16 @@ SELECT * FROM inet_tbl WHERE i <> '192.168.1.0/24'::cidr ORDER BY i;
-- test index-only scans
EXPLAIN (COSTS OFF)
SELECT i FROM inet_tbl WHERE i << '192.168.1.0/24'::cidr ORDER BY i;
- QUERY PLAN
----------------------------------------------------
- Sort
- Sort Key: i
- -> Index Only Scan using inet_idx2 on inet_tbl
- Index Cond: (i << '192.168.1.0/24'::inet)
-(4 rows)
+ QUERY PLAN
+---------------------------------------------------------------
+ Remote Subquery Scan on all (datanode_1,datanode_2)
+ -> Sort
+ Sort Key: i
+ -> Bitmap Heap Scan on inet_tbl
+ Recheck Cond: (i << '192.168.1.0/24'::inet)
+ -> Bitmap Index Scan on inet_idx2
+ Index Cond: (i << '192.168.1.0/24'::inet)
+(7 rows)
SELECT i FROM inet_tbl WHERE i << '192.168.1.0/24'::cidr ORDER BY i;
i