pgsql: Catch invalid typlens in a couple of places - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Catch invalid typlens in a couple of places
Date
Msg-id E1iRYnS-0000t2-Gy@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Catch invalid typlens in a couple of places

Rearrange the logic in record_image_cmp() and datum_image_eq() to
error out on unexpected typlens (either not supported there or
completely invalid due to corruption).  Barring corruption, this is
not possible today but it seems more future-proof and robust to fix
this.

Reported-by: Peter Geoghegan <pg@bowt.ie>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8557a6f10ca6f01f4b2f2f25e197292f3f46bb5c

Modified Files
--------------
src/backend/utils/adt/datum.c    | 22 ++++++++++++----------
src/backend/utils/adt/rowtypes.c | 24 +++++++++++++-----------
2 files changed, 25 insertions(+), 21 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Suppress warning from older compilers.
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Fix some compiler warnings on older compilers