aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2025-03-30 13:22:39 +0200
committerTomas Vondra <tomas.vondra@postgresql.org>2025-03-30 13:22:39 +0200
commit49b82522f13fa5f756687f5609f687877fc970ff (patch)
tree1cca324e5246bab0f547fdecd7a449f28aa0e5a8
parentd6d8054dc72d4844f52f1552f8d3074c16987e32 (diff)
downloadpostgresql-49b82522f13fa5f756687f5609f687877fc970ff.tar.gz
postgresql-49b82522f13fa5f756687f5609f687877fc970ff.zip
Remove incidental md5() function use from test
Replace md5() with sha256() in tests introduced in 14ffaece0fb5, to allow test to pass in OpenSSL FIPS mode. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/3518736.1743307492@sss.pgh.pa.us
-rw-r--r--contrib/amcheck/expected/check_gin.out4
-rw-r--r--contrib/amcheck/sql/check_gin.sql4
2 files changed, 4 insertions, 4 deletions
diff --git a/contrib/amcheck/expected/check_gin.out b/contrib/amcheck/expected/check_gin.out
index 93147de0ef1..b4f0b110747 100644
--- a/contrib/amcheck/expected/check_gin.out
+++ b/contrib/amcheck/expected/check_gin.out
@@ -50,9 +50,9 @@ SELECT setseed(1);
CREATE TABLE "gin_check_text_array"("Column1" text[]);
-- posting trees
-INSERT INTO gin_check_text_array select array_agg(md5(round(random()*300)::text)::text) from generate_series(1, 100000) as i group by i % 10000;
+INSERT INTO gin_check_text_array select array_agg(sha256(round(random()*300)::text::bytea)::text) from generate_series(1, 100000) as i group by i % 10000;
-- posting leaves
-INSERT INTO gin_check_text_array select array_agg(md5(round(random()*300 + 300)::text)::text) from generate_series(1, 10000) as i group by i % 100;
+INSERT INTO gin_check_text_array select array_agg(sha256(round(random()*300 + 300)::text::bytea)::text) from generate_series(1, 10000) as i group by i % 100;
CREATE INDEX gin_check_text_array_idx on "gin_check_text_array" USING GIN("Column1");
SELECT gin_index_check('gin_check_text_array_idx');
gin_index_check
diff --git a/contrib/amcheck/sql/check_gin.sql b/contrib/amcheck/sql/check_gin.sql
index 92ddbbc7a89..66f42c34311 100644
--- a/contrib/amcheck/sql/check_gin.sql
+++ b/contrib/amcheck/sql/check_gin.sql
@@ -30,9 +30,9 @@ DROP TABLE gin_check;
SELECT setseed(1);
CREATE TABLE "gin_check_text_array"("Column1" text[]);
-- posting trees
-INSERT INTO gin_check_text_array select array_agg(md5(round(random()*300)::text)::text) from generate_series(1, 100000) as i group by i % 10000;
+INSERT INTO gin_check_text_array select array_agg(sha256(round(random()*300)::text::bytea)::text) from generate_series(1, 100000) as i group by i % 10000;
-- posting leaves
-INSERT INTO gin_check_text_array select array_agg(md5(round(random()*300 + 300)::text)::text) from generate_series(1, 10000) as i group by i % 100;
+INSERT INTO gin_check_text_array select array_agg(sha256(round(random()*300 + 300)::text::bytea)::text) from generate_series(1, 10000) as i group by i % 100;
CREATE INDEX gin_check_text_array_idx on "gin_check_text_array" USING GIN("Column1");
SELECT gin_index_check('gin_check_text_array_idx');