aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/expandedrecord.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2019-10-04 14:24:46 -0400
committerRobert Haas <rhaas@postgresql.org>2019-10-04 14:24:46 -0400
commit2e8b6bfa90b252b1e1758364de7deff067d6058a (patch)
tree107b305708ca634a760b52526b94aa1ed459c1c9 /src/backend/utils/adt/expandedrecord.c
parent61aa9f544a91f2908e4c7cd549907cdc5b6f1c82 (diff)
downloadpostgresql-2e8b6bfa90b252b1e1758364de7deff067d6058a.tar.gz
postgresql-2e8b6bfa90b252b1e1758364de7deff067d6058a.zip
Rename some toasting functions based on whether they are heap-specific.
The old names for the attribute-detoasting functions names included the word "heap," which seems outdated now that the heap is only one of potentially many table access methods. On the other hand, toast_insert_or_update and toast_delete are heap-specific, so rename them by adding "heap_" as a prefix. Not all of the work of making the TOAST system fully accessible to AMs other than the heap is done yet, but there seems to be little harm in getting this renaming out of the way now. Commit 8b94dab06617ef80a0901ab103ebd8754427ef5a already divided up the functions among various files partially according to whether it was intended that they should be heap-specific or AM-agnostic, so this is just clarifying the division contemplated by that commit. Patch by me, reviewed and tested by Prabhat Sabu, Thomas Munro, Andres Freund, and Álvaro Herrera. Discussion: http://postgr.es/m/CA+TgmoZv-=2iWM4jcw5ZhJeL18HF96+W1yJeYrnGMYdkFFnEpQ@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/expandedrecord.c')
-rw-r--r--src/backend/utils/adt/expandedrecord.c4
1 files changed, 2 insertions, 2 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
{