Skip to content

Commit 4908684

Browse files
committed
Add regression test for minmax-multi macaddr8 type
The regression test for BRIN minmax-multi opclasses tested almost all supported data types, with the exception of macaddr8. So this adds it.
1 parent 1dad2a5 commit 4908684

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/test/regress/expected/brin_multi.out

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CREATE TABLE brintest_multi (
77
float4col real,
88
float8col double precision,
99
macaddrcol macaddr,
10+
macaddr8col macaddr8,
1011
inetcol inet,
1112
cidrcol cidr,
1213
datecol date,
@@ -28,6 +29,7 @@ INSERT INTO brintest_multi SELECT
2829
(four + 1.0)/(hundred+1),
2930
odd::float8 / (tenthous + 1),
3031
format('%s:00:%s:00:%s:00', to_hex(odd), to_hex(even), to_hex(hundred))::macaddr,
32+
substr(md5(unique1::text), 1, 16)::macaddr8,
3133
inet '10.2.3.4/24' + tenthous,
3234
cidr '10.2.3/24' + tenthous,
3335
date '1995-08-15' + tenthous,
@@ -69,6 +71,7 @@ CREATE INDEX brinidx_multi ON brintest_multi USING brin (
6971
float4col float4_minmax_multi_ops,
7072
float8col float8_minmax_multi_ops,
7173
macaddrcol macaddr_minmax_multi_ops,
74+
macaddr8col macaddr8_minmax_multi_ops,
7275
inetcol inet_minmax_multi_ops,
7376
cidrcol inet_minmax_multi_ops,
7477
datecol date_minmax_multi_ops,
@@ -91,6 +94,7 @@ CREATE INDEX brinidx_multi ON brintest_multi USING brin (
9194
float4col float4_minmax_multi_ops,
9295
float8col float8_minmax_multi_ops,
9396
macaddrcol macaddr_minmax_multi_ops,
97+
macaddr8col macaddr8_minmax_multi_ops,
9498
inetcol inet_minmax_multi_ops,
9599
cidrcol inet_minmax_multi_ops,
96100
datecol date_minmax_multi_ops,
@@ -172,6 +176,10 @@ INSERT INTO brinopers_multi VALUES
172176
'{>, >=, =, <=, <}',
173177
'{00:00:01:00:00:00, 00:00:01:00:00:00, 2c:00:2d:00:16:00, ff:fe:00:00:00:00, ff:fe:00:00:00:00}',
174178
'{99, 100, 2, 100, 100}'),
179+
('macaddr8col', 'macaddr8',
180+
'{>, >=, =, <=, <}',
181+
'{b1:d1:0e:7b:af:a4:42:12, d9:35:91:bd:f7:86:0e:1e, 72:8f:20:6c:2a:01:bf:57, 23:e8:46:63:86:07:ad:cb, 13:16:8e:6a:2e:6c:84:b4}',
182+
'{33, 15, 1, 13, 6}'),
175183
('inetcol', 'inet',
176184
'{=, <, <=, >, >=}',
177185
'{10.2.14.231/24, 255.255.255.255, 255.255.255.255, 0.0.0.0, 0.0.0.0}',
@@ -319,6 +327,7 @@ INSERT INTO brintest_multi SELECT
319327
(four + 1.0)/(hundred+1),
320328
odd::float8 / (tenthous + 1),
321329
format('%s:00:%s:00:%s:00', to_hex(odd), to_hex(even), to_hex(hundred))::macaddr,
330+
substr(md5(unique1::text), 1, 16)::macaddr8,
322331
inet '10.2.3.4' + tenthous,
323332
cidr '10.2.3/24' + tenthous,
324333
date '1995-08-15' + tenthous,

src/test/regress/sql/brin_multi.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CREATE TABLE brintest_multi (
77
float4col real,
88
float8col double precision,
99
macaddrcol macaddr,
10+
macaddr8col macaddr8,
1011
inetcol inet,
1112
cidrcol cidr,
1213
datecol date,
@@ -29,6 +30,7 @@ INSERT INTO brintest_multi SELECT
2930
(four + 1.0)/(hundred+1),
3031
odd::float8 / (tenthous + 1),
3132
format('%s:00:%s:00:%s:00', to_hex(odd), to_hex(even), to_hex(hundred))::macaddr,
33+
substr(md5(unique1::text), 1, 16)::macaddr8,
3234
inet '10.2.3.4/24' + tenthous,
3335
cidr '10.2.3/24' + tenthous,
3436
date '1995-08-15' + tenthous,
@@ -69,6 +71,7 @@ CREATE INDEX brinidx_multi ON brintest_multi USING brin (
6971
float4col float4_minmax_multi_ops,
7072
float8col float8_minmax_multi_ops,
7173
macaddrcol macaddr_minmax_multi_ops,
74+
macaddr8col macaddr8_minmax_multi_ops,
7275
inetcol inet_minmax_multi_ops,
7376
cidrcol inet_minmax_multi_ops,
7477
datecol date_minmax_multi_ops,
@@ -93,6 +96,7 @@ CREATE INDEX brinidx_multi ON brintest_multi USING brin (
9396
float4col float4_minmax_multi_ops,
9497
float8col float8_minmax_multi_ops,
9598
macaddrcol macaddr_minmax_multi_ops,
99+
macaddr8col macaddr8_minmax_multi_ops,
96100
inetcol inet_minmax_multi_ops,
97101
cidrcol inet_minmax_multi_ops,
98102
datecol date_minmax_multi_ops,
@@ -176,6 +180,10 @@ INSERT INTO brinopers_multi VALUES
176180
'{>, >=, =, <=, <}',
177181
'{00:00:01:00:00:00, 00:00:01:00:00:00, 2c:00:2d:00:16:00, ff:fe:00:00:00:00, ff:fe:00:00:00:00}',
178182
'{99, 100, 2, 100, 100}'),
183+
('macaddr8col', 'macaddr8',
184+
'{>, >=, =, <=, <}',
185+
'{b1:d1:0e:7b:af:a4:42:12, d9:35:91:bd:f7:86:0e:1e, 72:8f:20:6c:2a:01:bf:57, 23:e8:46:63:86:07:ad:cb, 13:16:8e:6a:2e:6c:84:b4}',
186+
'{33, 15, 1, 13, 6}'),
179187
('inetcol', 'inet',
180188
'{=, <, <=, >, >=}',
181189
'{10.2.14.231/24, 255.255.255.255, 255.255.255.255, 0.0.0.0, 0.0.0.0}',
@@ -326,6 +334,7 @@ INSERT INTO brintest_multi SELECT
326334
(four + 1.0)/(hundred+1),
327335
odd::float8 / (tenthous + 1),
328336
format('%s:00:%s:00:%s:00', to_hex(odd), to_hex(even), to_hex(hundred))::macaddr,
337+
substr(md5(unique1::text), 1, 16)::macaddr8,
329338
inet '10.2.3.4' + tenthous,
330339
cidr '10.2.3/24' + tenthous,
331340
date '1995-08-15' + tenthous,

0 commit comments

Comments
 (0)