Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5e87ebb

Browse files
committed
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.
1 parent 94470b9 commit 5e87ebb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/utils/adt/varlena.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.158 2007/09/22 00:36:38 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.159 2007/09/22 04:40:03 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -683,7 +683,7 @@ text_substring(Datum str, int32 start, int32 length, bool length_not_specified)
683683
* If we're working with an untoasted source, no need to do an
684684
* extra copying step.
685685
*/
686-
if (VARATT_IS_EXTENDED(str))
686+
if (VARATT_IS_COMPRESSED(str) || VARATT_IS_EXTERNAL(str))
687687
slice = DatumGetTextPSlice(str, slice_start, slice_size);
688688
else
689689
slice = (text *) DatumGetPointer(str);

0 commit comments

Comments
 (0)