summaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/adt/expandedrecord.c4
-rw-r--r--src/backend/utils/fmgr/fmgr.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/utils/adt/expandedrecord.c b/src/backend/utils/adt/expandedrecord.c
index 369432d53cb..d99d370b17c 100644
--- a/src/backend/utils/adt/expandedrecord.c
+++ b/src/backend/utils/adt/expandedrecord.c
@@ -1159,7 +1159,7 @@ expanded_record_set_field_internal(ExpandedRecordHeader *erh, int fnumber,
{
/* Detoasting should be done in short-lived context. */
oldcxt = MemoryContextSwitchTo(get_short_term_cxt(erh));
- newValue = PointerGetDatum(heap_tuple_fetch_attr((struct varlena *) DatumGetPointer(newValue)));
+ newValue = PointerGetDatum(detoast_external_attr((struct varlena *) DatumGetPointer(newValue)));
MemoryContextSwitchTo(oldcxt);
}
else
@@ -1305,7 +1305,7 @@ expanded_record_set_fields(ExpandedRecordHeader *erh,
if (expand_external)
{
/* Detoast as requested while copying the value */
- newValue = PointerGetDatum(heap_tuple_fetch_attr((struct varlena *) DatumGetPointer(newValue)));
+ newValue = PointerGetDatum(detoast_external_attr((struct varlena *) DatumGetPointer(newValue)));
}
else
{
diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c
index 0484adb984a..099ebd779ba 100644
--- a/src/backend/utils/fmgr/fmgr.c
+++ b/src/backend/utils/fmgr/fmgr.c
@@ -1739,7 +1739,7 @@ struct varlena *
pg_detoast_datum(struct varlena *datum)
{
if (VARATT_IS_EXTENDED(datum))
- return heap_tuple_untoast_attr(datum);
+ return detoast_attr(datum);
else
return datum;
}
@@ -1748,7 +1748,7 @@ struct varlena *
pg_detoast_datum_copy(struct varlena *datum)
{
if (VARATT_IS_EXTENDED(datum))
- return heap_tuple_untoast_attr(datum);
+ return detoast_attr(datum);
else
{
/* Make a modifiable copy of the varlena object */
@@ -1764,14 +1764,14 @@ struct varlena *
pg_detoast_datum_slice(struct varlena *datum, int32 first, int32 count)
{
/* Only get the specified portion from the toast rel */
- return heap_tuple_untoast_attr_slice(datum, first, count);
+ return detoast_attr_slice(datum, first, count);
}
struct varlena *
pg_detoast_datum_packed(struct varlena *datum)
{
if (VARATT_IS_COMPRESSED(datum) || VARATT_IS_EXTERNAL(datum))
- return heap_tuple_untoast_attr(datum);
+ return detoast_attr(datum);
else
return datum;
}