PostgreSQL Source Code
git master
|
#include "varatt.h"
Go to the source code of this file.
Data Structures | |
struct | ExpandedObjectMethods |
struct | ExpandedObjectHeader |
Macros | |
#define | EXPANDED_POINTER_SIZE (VARHDRSZ_EXTERNAL + sizeof(varatt_expanded)) |
#define | EOH_HEADER_MAGIC (-1) |
#define | VARATT_IS_EXPANDED_HEADER(PTR) (((varattrib_4b *) (PTR))->va_4byte.va_header == (uint32) EOH_HEADER_MAGIC) |
#define | DatumIsReadWriteExpandedObject(d, isnull, typlen) |
#define | MakeExpandedObjectReadOnly(d, isnull, typlen) |
Typedefs | |
typedef Size(* | EOM_get_flat_size_method) (ExpandedObjectHeader *eohptr) |
typedef void(* | EOM_flatten_into_method) (ExpandedObjectHeader *eohptr, void *result, Size allocated_size) |
typedef struct ExpandedObjectMethods | ExpandedObjectMethods |
Functions | |
static Datum | EOHPGetRWDatum (const struct ExpandedObjectHeader *eohptr) |
static Datum | EOHPGetRODatum (const struct ExpandedObjectHeader *eohptr) |
ExpandedObjectHeader * | DatumGetEOHP (Datum d) |
void | EOH_init_header (ExpandedObjectHeader *eohptr, const ExpandedObjectMethods *methods, MemoryContext obj_context) |
Size | EOH_get_flat_size (ExpandedObjectHeader *eohptr) |
void | EOH_flatten_into (ExpandedObjectHeader *eohptr, void *result, Size allocated_size) |
Datum | MakeExpandedObjectReadOnlyInternal (Datum d) |
Datum | TransferExpandedObject (Datum d, MemoryContext new_parent) |
void | DeleteExpandedObject (Datum d) |
#define DatumIsReadWriteExpandedObject | ( | d, | |
isnull, | |||
typlen | |||
) |
Definition at line 151 of file expandeddatum.h.
#define EOH_HEADER_MAGIC (-1) |
Definition at line 129 of file expandeddatum.h.
#define EXPANDED_POINTER_SIZE (VARHDRSZ_EXTERNAL + sizeof(varatt_expanded)) |
Definition at line 50 of file expandeddatum.h.
#define MakeExpandedObjectReadOnly | ( | d, | |
isnull, | |||
typlen | |||
) |
Definition at line 155 of file expandeddatum.h.
#define VARATT_IS_EXPANDED_HEADER | ( | PTR | ) | (((varattrib_4b *) (PTR))->va_4byte.va_header == (uint32) EOH_HEADER_MAGIC) |
Definition at line 130 of file expandeddatum.h.
typedef void(* EOM_flatten_into_method) (ExpandedObjectHeader *eohptr, void *result, Size allocated_size) |
Definition at line 70 of file expandeddatum.h.
typedef Size(* EOM_get_flat_size_method) (ExpandedObjectHeader *eohptr) |
Definition at line 69 of file expandeddatum.h.
typedef struct ExpandedObjectMethods ExpandedObjectMethods |
ExpandedObjectHeader* DatumGetEOHP | ( | Datum | d | ) |
Definition at line 29 of file expandeddatum.c.
References Assert, DatumGetPointer(), varatt_expanded::eohptr, VARATT_IS_EXPANDED_HEADER, VARATT_IS_EXTERNAL_EXPANDED, and VARDATA_EXTERNAL.
Referenced by advance_windowaggregate(), advance_windowaggregate_base(), array_get_element_expanded(), coerce_function_result_tuple(), construct_empty_expanded_array(), datumCopy(), datumEstimateSpace(), DatumGetAnyArrayP(), DatumGetExpandedArray(), DatumGetExpandedArrayX(), DatumGetExpandedRecord(), datumSerialize(), DeleteExpandedObject(), detoast_external_attr(), exec_move_row_from_datum(), ExecAggCopyTransValue(), ExecEvalFieldSelect(), expand_array(), fill_val(), heap_compute_data_size(), MakeExpandedObjectReadOnlyInternal(), plpgsql_exec_trigger(), toast_datum_size(), toast_raw_datum_size(), TransferExpandedObject(), and tts_virtual_materialize().
void DeleteExpandedObject | ( | Datum | d | ) |
Definition at line 136 of file expandeddatum.c.
References Assert, DatumGetEOHP(), DatumGetPointer(), ExpandedObjectHeader::eoh_context, MemoryContextDelete(), and VARATT_IS_EXTERNAL_EXPANDED_RW.
Referenced by advance_windowaggregate(), advance_windowaggregate_base(), assign_record_var(), assign_simple_var(), exec_move_row(), and ExecAggCopyTransValue().
void EOH_flatten_into | ( | ExpandedObjectHeader * | eohptr, |
void * | result, | ||
Size | allocated_size | ||
) |
Definition at line 81 of file expandeddatum.c.
References ExpandedObjectHeader::eoh_methods, and ExpandedObjectMethods::flatten_into.
Referenced by coerce_function_result_tuple(), datumCopy(), datumSerialize(), detoast_external_attr(), fill_val(), and tts_virtual_materialize().
Size EOH_get_flat_size | ( | ExpandedObjectHeader * | eohptr | ) |
Definition at line 75 of file expandeddatum.c.
References ExpandedObjectHeader::eoh_methods, and ExpandedObjectMethods::get_flat_size.
Referenced by coerce_function_result_tuple(), datumCopy(), datumEstimateSpace(), datumSerialize(), detoast_external_attr(), fill_val(), heap_compute_data_size(), toast_datum_size(), toast_raw_datum_size(), and tts_virtual_materialize().
void EOH_init_header | ( | ExpandedObjectHeader * | eohptr, |
const ExpandedObjectMethods * | methods, | ||
MemoryContext | obj_context | ||
) |
Definition at line 48 of file expandeddatum.c.
References ExpandedObjectHeader::eoh_context, EOH_HEADER_MAGIC, ExpandedObjectHeader::eoh_methods, ExpandedObjectHeader::eoh_ro_ptr, ExpandedObjectHeader::eoh_rw_ptr, varatt_expanded::eohptr, SET_VARTAG_EXTERNAL, VARDATA_EXTERNAL, VARTAG_EXPANDED_RO, VARTAG_EXPANDED_RW, and ExpandedObjectHeader::vl_len_.
Referenced by build_dummy_expanded_header(), expand_array(), make_expanded_record_from_datum(), make_expanded_record_from_exprecord(), make_expanded_record_from_tupdesc(), and make_expanded_record_from_typeid().
|
inlinestatic |
Definition at line 145 of file expandeddatum.h.
References ExpandedObjectHeader::eoh_ro_ptr, and PointerGetDatum().
Referenced by ExpandedRecordGetRODatum(), and MakeExpandedObjectReadOnlyInternal().
|
inlinestatic |
Definition at line 139 of file expandeddatum.h.
References ExpandedObjectHeader::eoh_rw_ptr, and PointerGetDatum().
Referenced by array_append(), array_prepend(), array_set_element_expanded(), expand_array(), ExpandedRecordGetDatum(), make_expanded_record_from_datum(), and TransferExpandedObject().
Definition at line 95 of file expandeddatum.c.
References DatumGetEOHP(), DatumGetPointer(), EOHPGetRODatum(), and VARATT_IS_EXTERNAL_EXPANDED_RW.
Referenced by ExecInterpExpr().
Datum TransferExpandedObject | ( | Datum | d, |
MemoryContext | new_parent | ||
) |
Definition at line 118 of file expandeddatum.c.
References Assert, DatumGetEOHP(), DatumGetPointer(), ExpandedObjectHeader::eoh_context, EOHPGetRWDatum(), MemoryContextSetParent(), and VARATT_IS_EXTERNAL_EXPANDED_RW.
Referenced by datumTransfer(), and plpgsql_exec_function().