From ff9571b9377bccbea7549cf9a9b43f794e4527b8 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 22 Sep 2007 04:40:03 +0000 Subject: [PATCH] Although I'd misdiagnosed the reason for the recent failures on buildfarm member grebe, I see no reason to revert the 1-byte-header-friendly changes I made in varlena.c. Instead, tweak the code a little bit to get more advantage out of that. --- src/backend/utils/adt/varlena.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c index 541382fbb5..105685df8e 100644 --- a/src/backend/utils/adt/varlena.c +++ b/src/backend/utils/adt/varlena.c @@ -683,7 +683,7 @@ text_substring(Datum str, int32 start, int32 length, bool length_not_specified) * If we're working with an untoasted source, no need to do an * extra copying step. */ - if (VARATT_IS_EXTENDED(str)) + if (VARATT_IS_COMPRESSED(str) || VARATT_IS_EXTERNAL(str)) slice = DatumGetTextPSlice(str, slice_start, slice_size); else slice = (text *) DatumGetPointer(str); -- 2.39.5