diff options
| author | Peter Eisentraut | 2023-07-04 12:31:57 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2023-07-04 12:31:57 +0000 |
| commit | 657f5f223e8fd9aa12d8d9fc473faecc267b9b7a (patch) | |
| tree | 14e8d6ed4e9be2b368b584c007ce2defce953fc0 /src/test/isolation | |
| parent | 625d5b3ca0968c1d8c080d5210f7209184c0d134 (diff) | |
Remove incidental md5() function uses from several tests
This removes md5() function calls from these test suites:
- bloom
- test_decoding
- isolation
- recovery
- subscription
This covers all remaining test suites where md5() calls were just used
to generate some random data and can be replaced by appropriately
adapted sha256() calls. This will eventually allow these tests to
pass in OpenSSL FIPS mode (which does not allow MD5 use). See also
208bf364a9. Unlike for the main regression tests, I didn't write a
fipshash() wrapper here, because that would have been too repetitive
and wouldn't really save much here. In some cases it was easier to
remove one layer of indirection by changing column types from text to
bytea.
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://www.postgresql.org/message-id/flat/f9b480b5-e473-d2d1-223a-4b9db30a229a@eisentraut.org
Diffstat (limited to 'src/test/isolation')
| -rw-r--r-- | src/test/isolation/specs/insert-conflict-specconflict.spec | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/isolation/specs/insert-conflict-specconflict.spec b/src/test/isolation/specs/insert-conflict-specconflict.spec index 0d55a015b6e..66748208672 100644 --- a/src/test/isolation/specs/insert-conflict-specconflict.spec +++ b/src/test/isolation/specs/insert-conflict-specconflict.spec @@ -31,7 +31,7 @@ setup RETURN $1; END;$$; - CREATE OR REPLACE FUNCTION ctoast_large_val() RETURNS TEXT LANGUAGE SQL AS 'select array_agg(md5(g::text))::text from generate_series(1, 256) g'; + CREATE OR REPLACE FUNCTION ctoast_large_val() RETURNS text LANGUAGE SQL AS $$ select string_agg(encode(sha256(g::text::bytea),'hex'), '')::text from generate_series(1, 133) g $$; CREATE TABLE upserttest(key text, data text); |
