Thread: pgsql: Revert error handling improvements for cryptohashes

pgsql: Revert error handling improvements for cryptohashes

From
Michael Paquier
Date:
Revert error handling improvements for cryptohashes

This reverts commits ab27df2, af8d530 and 3a0cced, that introduced
pg_cryptohash_error().  In order to make the core code able to pass down
the new error types that this introduced, some of the MD5-related
routines had to be reworked, causing an ABI breakage, but we found that
some external extensions rely on them.  Maintaining compatibility
outweights the error report benefits, so just revert the change in v14.

Reported-by: Laurenz Albe
Discussion: https://postgr.es/m/9f0c0a96d28cf14fc87296bbe67061c14eb53ae8.camel@cybertec.at

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ad5b6f248ab288c3252d8122d12a1eb410d4a0b6

Modified Files
--------------
contrib/passwordcheck/passwordcheck.c     |  2 +-
contrib/pgcrypto/internal-sha2.c          |  9 +--
contrib/pgcrypto/internal.c               | 18 ++----
contrib/uuid-ossp/uuid-ossp.c             | 18 ++----
src/backend/commands/user.c               |  4 +-
src/backend/libpq/auth-scram.c            |  2 +-
src/backend/libpq/auth.c                  | 36 +++++-------
src/backend/libpq/crypt.c                 | 38 +++++++------
src/backend/replication/backup_manifest.c |  9 +--
src/backend/utils/adt/cryptohashfuncs.c   | 25 +++------
src/common/cryptohash.c                   | 57 +------------------
src/common/cryptohash_openssl.c           | 93 -------------------------------
src/common/md5_common.c                   | 20 ++-----
src/include/common/cryptohash.h           |  1 -
src/include/common/md5.h                  |  9 +--
src/include/libpq/crypt.h                 |  7 +--
src/include/libpq/scram.h                 |  3 +-
src/interfaces/libpq/fe-auth.c            | 33 +++--------
src/tools/pgindent/typedefs.list          |  1 -
19 files changed, 88 insertions(+), 297 deletions(-)