Add missing error handling in pg_md5_hash().
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 19 Apr 2022 00:04:55 +0000 (20:04 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 19 Apr 2022 00:04:55 +0000 (20:04 -0400)
commit587de223f03e6086d511dab16b17406eb21277ce
tree6ec6e21845b962e6fc8a5da9a9c6201e10ff79b7
parent36d4efe779bfc7190ea1c1cf8deb0d945b726663
Add missing error handling in pg_md5_hash().

It failed to provide an error string as expected for the
admittedly-unlikely case of OOM in pg_cryptohash_create().
Also, make it initialize *errstr to NULL for success,
as pg_md5_binary() does.

Also add missing comments.  Readers should not have to
reverse-engineer the API spec for a publicly visible routine.
src/common/md5_common.c