From 4908684ddab35135869efa2af6b49c4d67c422f9 Mon Sep 17 00:00:00 2001 From: Tomas Vondra Date: Sun, 4 Apr 2021 19:26:48 +0200 Subject: [PATCH] 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. --- src/test/regress/expected/brin_multi.out | 9 +++++++++ src/test/regress/sql/brin_multi.sql | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/test/regress/expected/brin_multi.out b/src/test/regress/expected/brin_multi.out index 0a7e4b80600..d3d693e4649 100644 --- a/src/test/regress/expected/brin_multi.out +++ b/src/test/regress/expected/brin_multi.out @@ -7,6 +7,7 @@ CREATE TABLE brintest_multi ( float4col real, float8col double precision, macaddrcol macaddr, + macaddr8col macaddr8, inetcol inet, cidrcol cidr, datecol date, @@ -28,6 +29,7 @@ INSERT INTO brintest_multi SELECT (four + 1.0)/(hundred+1), odd::float8 / (tenthous + 1), format('%s:00:%s:00:%s:00', to_hex(odd), to_hex(even), to_hex(hundred))::macaddr, + substr(md5(unique1::text), 1, 16)::macaddr8, inet '10.2.3.4/24' + tenthous, cidr '10.2.3/24' + tenthous, date '1995-08-15' + tenthous, @@ -69,6 +71,7 @@ CREATE INDEX brinidx_multi ON brintest_multi USING brin ( float4col float4_minmax_multi_ops, float8col float8_minmax_multi_ops, macaddrcol macaddr_minmax_multi_ops, + macaddr8col macaddr8_minmax_multi_ops, inetcol inet_minmax_multi_ops, cidrcol inet_minmax_multi_ops, datecol date_minmax_multi_ops, @@ -91,6 +94,7 @@ CREATE INDEX brinidx_multi ON brintest_multi USING brin ( float4col float4_minmax_multi_ops, float8col float8_minmax_multi_ops, macaddrcol macaddr_minmax_multi_ops, + macaddr8col macaddr8_minmax_multi_ops, inetcol inet_minmax_multi_ops, cidrcol inet_minmax_multi_ops, datecol date_minmax_multi_ops, @@ -172,6 +176,10 @@ INSERT INTO brinopers_multi VALUES '{>, >=, =, <=, <}', '{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}', '{99, 100, 2, 100, 100}'), + ('macaddr8col', 'macaddr8', + '{>, >=, =, <=, <}', + '{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}', + '{33, 15, 1, 13, 6}'), ('inetcol', 'inet', '{=, <, <=, >, >=}', '{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 (four + 1.0)/(hundred+1), odd::float8 / (tenthous + 1), format('%s:00:%s:00:%s:00', to_hex(odd), to_hex(even), to_hex(hundred))::macaddr, + substr(md5(unique1::text), 1, 16)::macaddr8, inet '10.2.3.4' + tenthous, cidr '10.2.3/24' + tenthous, date '1995-08-15' + tenthous, diff --git a/src/test/regress/sql/brin_multi.sql b/src/test/regress/sql/brin_multi.sql index f5ffcaea33e..70b751068b0 100644 --- a/src/test/regress/sql/brin_multi.sql +++ b/src/test/regress/sql/brin_multi.sql @@ -7,6 +7,7 @@ CREATE TABLE brintest_multi ( float4col real, float8col double precision, macaddrcol macaddr, + macaddr8col macaddr8, inetcol inet, cidrcol cidr, datecol date, @@ -29,6 +30,7 @@ INSERT INTO brintest_multi SELECT (four + 1.0)/(hundred+1), odd::float8 / (tenthous + 1), format('%s:00:%s:00:%s:00', to_hex(odd), to_hex(even), to_hex(hundred))::macaddr, + substr(md5(unique1::text), 1, 16)::macaddr8, inet '10.2.3.4/24' + tenthous, cidr '10.2.3/24' + tenthous, date '1995-08-15' + tenthous, @@ -69,6 +71,7 @@ CREATE INDEX brinidx_multi ON brintest_multi USING brin ( float4col float4_minmax_multi_ops, float8col float8_minmax_multi_ops, macaddrcol macaddr_minmax_multi_ops, + macaddr8col macaddr8_minmax_multi_ops, inetcol inet_minmax_multi_ops, cidrcol inet_minmax_multi_ops, datecol date_minmax_multi_ops, @@ -93,6 +96,7 @@ CREATE INDEX brinidx_multi ON brintest_multi USING brin ( float4col float4_minmax_multi_ops, float8col float8_minmax_multi_ops, macaddrcol macaddr_minmax_multi_ops, + macaddr8col macaddr8_minmax_multi_ops, inetcol inet_minmax_multi_ops, cidrcol inet_minmax_multi_ops, datecol date_minmax_multi_ops, @@ -176,6 +180,10 @@ INSERT INTO brinopers_multi VALUES '{>, >=, =, <=, <}', '{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}', '{99, 100, 2, 100, 100}'), + ('macaddr8col', 'macaddr8', + '{>, >=, =, <=, <}', + '{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}', + '{33, 15, 1, 13, 6}'), ('inetcol', 'inet', '{=, <, <=, >, >=}', '{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 (four + 1.0)/(hundred+1), odd::float8 / (tenthous + 1), format('%s:00:%s:00:%s:00', to_hex(odd), to_hex(even), to_hex(hundred))::macaddr, + substr(md5(unique1::text), 1, 16)::macaddr8, inet '10.2.3.4' + tenthous, cidr '10.2.3/24' + tenthous, date '1995-08-15' + tenthous, -- 2.30.2