diff options
Diffstat (limited to 'src/backend/access/spgist/spgtextproc.c')
-rw-r--r-- | src/backend/access/spgist/spgtextproc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/access/spgist/spgtextproc.c b/src/backend/access/spgist/spgtextproc.c index 86788549a55..53f298b6c2f 100644 --- a/src/backend/access/spgist/spgtextproc.c +++ b/src/backend/access/spgist/spgtextproc.c @@ -568,8 +568,9 @@ spg_text_leaf_consistent(PG_FUNCTION_ARGS) leafValue = DatumGetTextPP(in->leafDatum); + /* As above, in->reconstructedValue isn't toasted or short. */ if (DatumGetPointer(in->reconstructedValue)) - reconstrValue = DatumGetTextP(in->reconstructedValue); + reconstrValue = (text *) DatumGetPointer(in->reconstructedValue); Assert(reconstrValue == NULL ? level == 0 : VARSIZE_ANY_EXHDR(reconstrValue) == level); |