mirror of
https://github.com/postgres/postgres.git
synced 2025-05-11 05:41:32 +03:00
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:
parent
0bd56172b2
commit
4fb5c794e5
@ -484,7 +484,7 @@ ERROR: block number out of range: -1
|
||||
SELECT brin_summarize_range('brin_summarize_idx', 4294967296);
|
||||
ERROR: block number out of range: 4294967296
|
||||
-- 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);
|
||||
INSERT INTO brintest_2 VALUES ('empty');
|
||||
INSERT INTO brintest_2 VALUES (numrange(0, 2^1000::numeric));
|
||||
|
@ -74,7 +74,7 @@ select count(*) > 0 as ok from gin_test_tbl where i @> array[1];
|
||||
|
||||
reset gin_fuzzy_search_limit;
|
||||
-- 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);
|
||||
insert into t_gin_test_tbl
|
||||
values
|
||||
|
@ -36,7 +36,7 @@ reindex index gist_pointidx;
|
||||
--
|
||||
-- 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
|
||||
select box(point(0.05*i, 0.05*i), point(0.05*i, 0.05*i)),
|
||||
point(0.05*i, 0.05*i),
|
||||
|
@ -26,7 +26,7 @@ vacuum spgist_point_tbl;
|
||||
-- Test rescan paths (cf. bug #15378)
|
||||
-- use box and && rather than point, so that rescan happens when the
|
||||
-- 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)
|
||||
select box(point(i,j),point(i+s,j+s))
|
||||
from generate_series(1,100,5) i,
|
||||
|
@ -449,7 +449,7 @@ SELECT brin_summarize_range('brin_summarize_idx', -1);
|
||||
SELECT brin_summarize_range('brin_summarize_idx', 4294967296);
|
||||
|
||||
-- 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);
|
||||
INSERT INTO brintest_2 VALUES ('empty');
|
||||
INSERT INTO brintest_2 VALUES (numrange(0, 2^1000::numeric));
|
||||
|
@ -52,7 +52,7 @@ select count(*) > 0 as ok from gin_test_tbl where i @> array[1];
|
||||
reset gin_fuzzy_search_limit;
|
||||
|
||||
-- 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);
|
||||
insert into t_gin_test_tbl
|
||||
values
|
||||
|
@ -41,7 +41,7 @@ reindex index gist_pointidx;
|
||||
-- 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
|
||||
select box(point(0.05*i, 0.05*i), point(0.05*i, 0.05*i)),
|
||||
|
@ -34,7 +34,7 @@ vacuum spgist_point_tbl;
|
||||
-- use box and && rather than point, so that rescan happens when the
|
||||
-- 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)
|
||||
select box(point(i,j),point(i+s,j+s))
|
||||
from generate_series(1,100,5) i,
|
||||
|
Loading…
x
Reference in New Issue
Block a user