]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix oversight in commit 4429f6a9e3e12bb4af6e3677fbc78cd80f160252.
authorAmit Kapila <akapila@postgresql.org>
Wed, 18 Sep 2019 03:44:26 +0000 (09:14 +0530)
committerAmit Kapila <akapila@postgresql.org>
Fri, 27 Sep 2019 03:14:28 +0000 (08:44 +0530)
The test name and the following test cases suggest the index created
should be hash index, but it forgot to add 'using hash' in the test case.
This in itself won't improve code coverage as there were some other tests
which were covering the corresponding code.  However, it is better if the
added tests serve their actual purpose.

Reported-by: Paul A Jungwirth
Author: Paul A Jungwirth
Reviewed-by: Mahendra Singh
Backpatch-through: 9.4
Discussion: https://postgr.es/m/CA+renyV=Us-5XfMC25bNp-uWSj39XgHHmGE9Rh2cQKMegSj52g@mail.gmail.com

src/test/regress/expected/rangetypes.out
src/test/regress/sql/rangetypes.sql

index 6756a2151b9806d7654c03b047ea45e2a379b08c..130604b37d01cc15586d4f4b7b5aff28178a39f9 100644 (file)
@@ -519,7 +519,8 @@ select numrange(1.0, 2.0) * numrange(2.5, 3.0);
 (1 row)
 
 create table numrange_test2(nr numrange);
-create index numrange_test2_hash_idx on numrange_test2 (nr);
+create index numrange_test2_hash_idx on numrange_test2 using hash (nr);
+WARNING:  hash indexes are not WAL-logged and their use is discouraged
 INSERT INTO numrange_test2 VALUES('[, 5)');
 INSERT INTO numrange_test2 VALUES(numrange(1.1, 2.2));
 INSERT INTO numrange_test2 VALUES(numrange(1.1, 2.2));
index 62cb474a42324d120851025f61acb2e939ff9c01..0793a8235a164be96b82a17c845dc1a226f6ba73 100644 (file)
@@ -119,7 +119,7 @@ select numrange(1.0, 2.0) * numrange(1.5, 3.0);
 select numrange(1.0, 2.0) * numrange(2.5, 3.0);
 
 create table numrange_test2(nr numrange);
-create index numrange_test2_hash_idx on numrange_test2 (nr);
+create index numrange_test2_hash_idx on numrange_test2 using hash (nr);
 
 INSERT INTO numrange_test2 VALUES('[, 5)');
 INSERT INTO numrange_test2 VALUES(numrange(1.1, 2.2));