Обсуждение: pgsql: Catch invalid typlens in a couple of places

Поиск
Список
Период
Сортировка

pgsql: Catch invalid typlens in a couple of places

От
Peter Eisentraut
Дата:
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
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5a2967412f63f3b9390aa7b3af95e2fae0965ff8

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