projects
/
users
/
simon
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7abe0a
)
Although I'd misdiagnosed the reason for the recent failures on
author
Tom Lane
<tgl@sss.pgh.pa.us>
Sat, 22 Sep 2007 04:40:03 +0000
(
04:40
+0000)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Sat, 22 Sep 2007 04:40:03 +0000
(
04:40
+0000)
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
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/adt/varlena.c
b/src/backend/utils/adt/varlena.c
index 541382fbb5da5abd5444b16e3cd9363847c0d0d1..105685df8ef5232d82f08bc6ec1c4e90872eb718 100644
(file)
--- 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);