@ -30,7 +30,7 @@ static struct varlena *toast_decompress_datum(struct varlena *attr);
static struct varlena * toast_decompress_datum_slice ( struct varlena * attr , int32 slicelength ) ;
static struct varlena * toast_decompress_datum_slice ( struct varlena * attr , int32 slicelength ) ;
/* ----------
/* ----------
* heap_tuple_fetch _attr -
* detoast_external _attr -
*
*
* Public entry point to get back a toasted value from
* Public entry point to get back a toasted value from
* external source ( possibly still in compressed format ) .
* external source ( possibly still in compressed format ) .
@ -42,7 +42,7 @@ static struct varlena *toast_decompress_datum_slice(struct varlena *attr, int32
* - - - - - - - - - -
* - - - - - - - - - -
*/
*/
struct varlena *
struct varlena *
heap_tuple_fetch _attr( struct varlena * attr )
detoast_external _attr( struct varlena * attr )
{
{
struct varlena * result ;
struct varlena * result ;
@ -68,7 +68,7 @@ heap_tuple_fetch_attr(struct varlena *attr)
/* recurse if value is still external in some other way */
/* recurse if value is still external in some other way */
if ( VARATT_IS_EXTERNAL ( attr ) )
if ( VARATT_IS_EXTERNAL ( attr ) )
return heap_tuple_fetch _attr( attr ) ;
return detoast_external _attr( attr ) ;
/*
/*
* Copy into the caller ' s memory context , in case caller tries to
* Copy into the caller ' s memory context , in case caller tries to
@ -103,7 +103,7 @@ heap_tuple_fetch_attr(struct varlena *attr)
/* ----------
/* ----------
* heap_tuple_un toast_attr -
* de toast_attr -
*
*
* Public entry point to get back a toasted value from compression
* Public entry point to get back a toasted value from compression
* or external storage . The result is always non - extended varlena form .
* or external storage . The result is always non - extended varlena form .
@ -113,7 +113,7 @@ heap_tuple_fetch_attr(struct varlena *attr)
* - - - - - - - - - -
* - - - - - - - - - -
*/
*/
struct varlena *
struct varlena *
heap_tuple_un toast_attr( struct varlena * attr )
de toast_attr( struct varlena * attr )
{
{
if ( VARATT_IS_EXTERNAL_ONDISK ( attr ) )
if ( VARATT_IS_EXTERNAL_ONDISK ( attr ) )
{
{
@ -144,7 +144,7 @@ heap_tuple_untoast_attr(struct varlena *attr)
Assert ( ! VARATT_IS_EXTERNAL_INDIRECT ( attr ) ) ;
Assert ( ! VARATT_IS_EXTERNAL_INDIRECT ( attr ) ) ;
/* recurse in case value is still extended in some other way */
/* recurse in case value is still extended in some other way */
attr = heap_tuple_un toast_attr( attr ) ;
attr = de toast_attr( attr ) ;
/* if it isn't, we'd better copy it */
/* if it isn't, we'd better copy it */
if ( attr = = ( struct varlena * ) redirect . pointer )
if ( attr = = ( struct varlena * ) redirect . pointer )
@ -161,7 +161,7 @@ heap_tuple_untoast_attr(struct varlena *attr)
/*
/*
* This is an expanded - object pointer - - - get flat format
* This is an expanded - object pointer - - - get flat format
*/
*/
attr = heap_tuple_fetch _attr( attr ) ;
attr = detoast_external _attr( attr ) ;
/* flatteners are not allowed to produce compressed/short output */
/* flatteners are not allowed to produce compressed/short output */
Assert ( ! VARATT_IS_EXTENDED ( attr ) ) ;
Assert ( ! VARATT_IS_EXTENDED ( attr ) ) ;
}
}
@ -192,7 +192,7 @@ heap_tuple_untoast_attr(struct varlena *attr)
/* ----------
/* ----------
* heap_tuple_un toast_attr_slice -
* de toast_attr_slice -
*
*
* Public entry point to get back part of a toasted value
* Public entry point to get back part of a toasted value
* from compression or external storage .
* from compression or external storage .
@ -201,7 +201,7 @@ heap_tuple_untoast_attr(struct varlena *attr)
* - - - - - - - - - -
* - - - - - - - - - -
*/
*/
struct varlena *
struct varlena *
heap_tuple_un toast_attr_slice( struct varlena * attr ,
de toast_attr_slice( struct varlena * attr ,
int32 sliceoffset , int32 slicelength )
int32 sliceoffset , int32 slicelength )
{
{
struct varlena * preslice ;
struct varlena * preslice ;
@ -253,13 +253,13 @@ heap_tuple_untoast_attr_slice(struct varlena *attr,
/* nested indirect Datums aren't allowed */
/* nested indirect Datums aren't allowed */
Assert ( ! VARATT_IS_EXTERNAL_INDIRECT ( redirect . pointer ) ) ;
Assert ( ! VARATT_IS_EXTERNAL_INDIRECT ( redirect . pointer ) ) ;
return heap_tuple_un toast_attr_slice( redirect . pointer ,
return de toast_attr_slice( redirect . pointer ,
sliceoffset , slicelength ) ;
sliceoffset , slicelength ) ;
}
}
else if ( VARATT_IS_EXTERNAL_EXPANDED ( attr ) )
else if ( VARATT_IS_EXTERNAL_EXPANDED ( attr ) )
{
{
/* pass it off to heap_tuple_fetch _attr to flatten */
/* pass it off to detoast_external _attr to flatten */
preslice = heap_tuple_fetch _attr( attr ) ;
preslice = detoast_external _attr( attr ) ;
}
}
else
else
preslice = attr ;
preslice = attr ;
@ -771,7 +771,7 @@ toast_decompress_datum(struct varlena *attr)
* toast_decompress_datum_slice -
* toast_decompress_datum_slice -
*
*
* Decompress the front of a compressed version of a varlena datum .
* Decompress the front of a compressed version of a varlena datum .
* offset handling happens in heap_tuple_un toast_attr_slice.
* offset handling happens in de toast_attr_slice.
* Here we just decompress a slice from the front .
* Here we just decompress a slice from the front .
*/
*/
static struct varlena *
static struct varlena *