pgsql: Add missing error handling in pg_md5_hash().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add missing error handling in pg_md5_hash().
Date: 2022-04-19 00:05:17
Message-ID: E1ngbMr-0019IZ-DU@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/587de223f03e6086d511dab16b17406eb21277ce

Modified Files
--------------
src/common/md5_common.c | 13 +++++++++++++
1 file changed, 13 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2022-04-19 02:33:25 Re: pgsql: Add TAP test for archive_cleanup_command and recovery_end_comman
Previous Message Thomas Munro 2022-04-18 21:45:11 Re: pgsql: Add TAP test for archive_cleanup_command and recovery_end_comman