Thread: pgsql: Remove incidental md5() function uses from main regression tests

pgsql: Remove incidental md5() function uses from main regression tests

From
Peter Eisentraut
Date:
Remove incidental md5() function uses from main regression tests

Most of these calls were to generate some random data.  These can be
replaced by appropriately adapted sha256() calls.  To keep the diff
smaller, we wrap this into a helper function that produces the same
output format and length as the md5() call.

This will eventually allow these tests to pass in OpenSSL FIPS mode
(which does not allow MD5 use).

Similar work for other test suites will follow later.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/dbbd927f-ef1f-c9a1-4ec6-c759778ac852@enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/208bf364a9cc80cc586d060726d076ba7d0c8dec

Modified Files
--------------
src/test/regress/expected/arrays.out        |   6 +-
src/test/regress/expected/brin.out          |   4 +-
src/test/regress/expected/brin_multi.out    |   6 +-
src/test/regress/expected/compression.out   |   8 +-
src/test/regress/expected/compression_1.out |   8 +-
src/test/regress/expected/inherit.out       |   2 +-
src/test/regress/expected/largeobject.out   |   2 +-
src/test/regress/expected/largeobject_1.out |   2 +-
src/test/regress/expected/matview.out       |   8 +-
src/test/regress/expected/memoize.out       |   2 +-
src/test/regress/expected/plpgsql.out       |  20 +-
src/test/regress/expected/rowsecurity.out   | 546 ++++++++++++++--------------
src/test/regress/expected/stats_ext.out     |  18 +-
src/test/regress/expected/test_setup.out    |  12 +
src/test/regress/sql/arrays.sql             |   6 +-
src/test/regress/sql/brin.sql               |   4 +-
src/test/regress/sql/brin_multi.sql         |   6 +-
src/test/regress/sql/compression.sql        |   4 +-
src/test/regress/sql/inherit.sql            |   2 +-
src/test/regress/sql/largeobject.sql        |   2 +-
src/test/regress/sql/matview.sql            |   8 +-
src/test/regress/sql/memoize.sql            |   2 +-
src/test/regress/sql/plpgsql.sql            |   2 +-
src/test/regress/sql/rowsecurity.sql        |  14 +-
src/test/regress/sql/stats_ext.sql          |  18 +-
src/test/regress/sql/test_setup.sql         |  15 +
26 files changed, 374 insertions(+), 353 deletions(-)