Cover brin/gin/gist/spgist ambuildempty routines in regression tests

Changing some TEMP or permanent tables to UNLOGGED is sufficient to
invoke these ambuildempty routines, which were all not uncovered by any
tests.  These changes do not otherwise affect the test suite.

Author: Amul Sul <sulamul@gmail.com>
Discussion: https://postgr.es/m/CAAJ_b95nneRCLM-=qELEdgCYSk6W_++-C+Q_t+wH3SW-hF50iw@mail.gmail.com
This commit is contained in:
Alvaro Herrera 2022-04-25 15:00:49 +02:00
parent 0bd56172b2
commit 4fb5c794e5
No known key found for this signature in database
GPG Key ID: 1C20ACB9D5C564AE
8 changed files with 8 additions and 8 deletions

View File

@ -484,7 +484,7 @@ ERROR: block number out of range: -1
SELECT brin_summarize_range('brin_summarize_idx', 4294967296); SELECT brin_summarize_range('brin_summarize_idx', 4294967296);
ERROR: block number out of range: 4294967296 ERROR: block number out of range: 4294967296
-- test value merging in add_value -- test value merging in add_value
CREATE TABLE brintest_2 (n numrange); CREATE UNLOGGED TABLE brintest_2 (n numrange);
CREATE INDEX brinidx_2 ON brintest_2 USING brin (n); CREATE INDEX brinidx_2 ON brintest_2 USING brin (n);
INSERT INTO brintest_2 VALUES ('empty'); INSERT INTO brintest_2 VALUES ('empty');
INSERT INTO brintest_2 VALUES (numrange(0, 2^1000::numeric)); INSERT INTO brintest_2 VALUES (numrange(0, 2^1000::numeric));

View File

@ -74,7 +74,7 @@ select count(*) > 0 as ok from gin_test_tbl where i @> array[1];
reset gin_fuzzy_search_limit; reset gin_fuzzy_search_limit;
-- Test optimization of empty queries -- Test optimization of empty queries
create temp table t_gin_test_tbl(i int4[], j int4[]); create unlogged table t_gin_test_tbl(i int4[], j int4[]);
create index on t_gin_test_tbl using gin (i, j); create index on t_gin_test_tbl using gin (i, j);
insert into t_gin_test_tbl insert into t_gin_test_tbl
values values

View File

@ -36,7 +36,7 @@ reindex index gist_pointidx;
-- --
-- Test Index-only plans on GiST indexes -- Test Index-only plans on GiST indexes
-- --
create table gist_tbl (b box, p point, c circle); create unlogged table gist_tbl (b box, p point, c circle);
insert into gist_tbl insert into gist_tbl
select box(point(0.05*i, 0.05*i), point(0.05*i, 0.05*i)), select box(point(0.05*i, 0.05*i), point(0.05*i, 0.05*i)),
point(0.05*i, 0.05*i), point(0.05*i, 0.05*i),

View File

@ -26,7 +26,7 @@ vacuum spgist_point_tbl;
-- Test rescan paths (cf. bug #15378) -- Test rescan paths (cf. bug #15378)
-- use box and && rather than point, so that rescan happens when the -- use box and && rather than point, so that rescan happens when the
-- traverse stack is non-empty -- traverse stack is non-empty
create table spgist_box_tbl(id serial, b box); create unlogged table spgist_box_tbl(id serial, b box);
insert into spgist_box_tbl(b) insert into spgist_box_tbl(b)
select box(point(i,j),point(i+s,j+s)) select box(point(i,j),point(i+s,j+s))
from generate_series(1,100,5) i, from generate_series(1,100,5) i,

View File

@ -449,7 +449,7 @@ SELECT brin_summarize_range('brin_summarize_idx', -1);
SELECT brin_summarize_range('brin_summarize_idx', 4294967296); SELECT brin_summarize_range('brin_summarize_idx', 4294967296);
-- test value merging in add_value -- test value merging in add_value
CREATE TABLE brintest_2 (n numrange); CREATE UNLOGGED TABLE brintest_2 (n numrange);
CREATE INDEX brinidx_2 ON brintest_2 USING brin (n); CREATE INDEX brinidx_2 ON brintest_2 USING brin (n);
INSERT INTO brintest_2 VALUES ('empty'); INSERT INTO brintest_2 VALUES ('empty');
INSERT INTO brintest_2 VALUES (numrange(0, 2^1000::numeric)); INSERT INTO brintest_2 VALUES (numrange(0, 2^1000::numeric));

View File

@ -52,7 +52,7 @@ select count(*) > 0 as ok from gin_test_tbl where i @> array[1];
reset gin_fuzzy_search_limit; reset gin_fuzzy_search_limit;
-- Test optimization of empty queries -- Test optimization of empty queries
create temp table t_gin_test_tbl(i int4[], j int4[]); create unlogged table t_gin_test_tbl(i int4[], j int4[]);
create index on t_gin_test_tbl using gin (i, j); create index on t_gin_test_tbl using gin (i, j);
insert into t_gin_test_tbl insert into t_gin_test_tbl
values values

View File

@ -41,7 +41,7 @@ reindex index gist_pointidx;
-- Test Index-only plans on GiST indexes -- Test Index-only plans on GiST indexes
-- --
create table gist_tbl (b box, p point, c circle); create unlogged table gist_tbl (b box, p point, c circle);
insert into gist_tbl insert into gist_tbl
select box(point(0.05*i, 0.05*i), point(0.05*i, 0.05*i)), select box(point(0.05*i, 0.05*i), point(0.05*i, 0.05*i)),

View File

@ -34,7 +34,7 @@ vacuum spgist_point_tbl;
-- use box and && rather than point, so that rescan happens when the -- use box and && rather than point, so that rescan happens when the
-- traverse stack is non-empty -- traverse stack is non-empty
create table spgist_box_tbl(id serial, b box); create unlogged table spgist_box_tbl(id serial, b box);
insert into spgist_box_tbl(b) insert into spgist_box_tbl(b)
select box(point(i,j),point(i+s,j+s)) select box(point(i,j),point(i+s,j+s))
from generate_series(1,100,5) i, from generate_series(1,100,5) i,