From: Tomas Vondra Date: Sun, 30 Mar 2025 11:22:39 +0000 (+0200) Subject: Remove incidental md5() function use from test X-Git-Tag: REL_18_BETA1~373 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=49b82522f13fa5f756687f5609f687877fc970ff;p=thirdparty%2Fpostgresql.git 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 Discussion: https://postgr.es/m/3518736.1743307492@sss.pgh.pa.us --- 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');