Catch invalid typlens in a couple of places
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 4 Nov 2019 08:54:47 +0000 (09:54 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 4 Nov 2019 09:03:18 +0000 (10:03 +0100)
commit7ab7c5c685f7752a0d7476910b98fe318ae85a04
tree3d29ef4cf2bcb6f6a22b08dad5efef3dd6093190
parentf88f7206edbfe9d06655e3885219d812b0362251
Catch invalid typlens in a couple of places

Rearrange the logic in record_image_cmp() and record_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>
src/backend/utils/adt/rowtypes.c