mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
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
8b94dab066
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
This commit is contained in:
@@ -44,34 +44,34 @@ do { \
|
||||
#define INDIRECT_POINTER_SIZE (VARHDRSZ_EXTERNAL + sizeof(varatt_indirect))
|
||||
|
||||
/* ----------
|
||||
* heap_tuple_fetch_attr() -
|
||||
* detoast_external_attr() -
|
||||
*
|
||||
* Fetches an external stored attribute from the toast
|
||||
* relation. Does NOT decompress it, if stored external
|
||||
* in compressed format.
|
||||
* ----------
|
||||
*/
|
||||
extern struct varlena *heap_tuple_fetch_attr(struct varlena *attr);
|
||||
extern struct varlena *detoast_external_attr(struct varlena *attr);
|
||||
|
||||
/* ----------
|
||||
* heap_tuple_untoast_attr() -
|
||||
* detoast_attr() -
|
||||
*
|
||||
* Fully detoasts one attribute, fetching and/or decompressing
|
||||
* it as needed.
|
||||
* ----------
|
||||
*/
|
||||
extern struct varlena *heap_tuple_untoast_attr(struct varlena *attr);
|
||||
extern struct varlena *detoast_attr(struct varlena *attr);
|
||||
|
||||
/* ----------
|
||||
* heap_tuple_untoast_attr_slice() -
|
||||
* detoast_attr_slice() -
|
||||
*
|
||||
* Fetches only the specified portion of an attribute.
|
||||
* (Handles all cases for attribute storage)
|
||||
* ----------
|
||||
*/
|
||||
extern struct varlena *heap_tuple_untoast_attr_slice(struct varlena *attr,
|
||||
int32 sliceoffset,
|
||||
int32 slicelength);
|
||||
extern struct varlena *detoast_attr_slice(struct varlena *attr,
|
||||
int32 sliceoffset,
|
||||
int32 slicelength);
|
||||
|
||||
/* ----------
|
||||
* toast_raw_datum_size -
|
||||
|
@@ -89,22 +89,22 @@
|
||||
VARHDRSZ)
|
||||
|
||||
/* ----------
|
||||
* toast_insert_or_update -
|
||||
* heap_toast_insert_or_update -
|
||||
*
|
||||
* Called by heap_insert() and heap_update().
|
||||
* ----------
|
||||
*/
|
||||
extern HeapTuple toast_insert_or_update(Relation rel,
|
||||
HeapTuple newtup, HeapTuple oldtup,
|
||||
int options);
|
||||
extern HeapTuple heap_toast_insert_or_update(Relation rel, HeapTuple newtup,
|
||||
HeapTuple oldtup, int options);
|
||||
|
||||
/* ----------
|
||||
* toast_delete -
|
||||
* heap_toast_delete -
|
||||
*
|
||||
* Called by heap_delete().
|
||||
* ----------
|
||||
*/
|
||||
extern void toast_delete(Relation rel, HeapTuple oldtup, bool is_speculative);
|
||||
extern void heap_toast_delete(Relation rel, HeapTuple oldtup,
|
||||
bool is_speculative);
|
||||
|
||||
/* ----------
|
||||
* toast_flatten_tuple -
|
||||
|
Reference in New Issue
Block a user