Definition at line 130 of file heapfuncs.c.
139 (
errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
140 errmsg(
"must be superuser to use raw page functions")));
151 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
152 errmsg(
"input page too small (%d bytes)", raw_page_size)));
161 elog(
ERROR,
"return type must be a row type");
163 inter_call_data->
tupd = tupdesc;
189 memset(nulls, 0,
sizeof(nulls));
212 lp_offset + lp_len <= raw_page_size)
215 bytea *tuple_data_bytea;
232 tuple_data_len = lp_len - tuphdr->
t_hoff;
235 memcpy(
VARDATA(tuple_data_bytea), (
char *) tuphdr + tuphdr->
t_hoff,
246 tuphdr->
t_hoff <= lp_len &&
279 for (
i = 4;
i <= 13;
i++)
287 inter_call_data->
offset++;
static Datum values[MAXATTR]
static Item PageGetItem(Page page, ItemId itemId)
#define SizeOfPageHeaderData
static ItemId PageGetItemId(Page page, OffsetNumber offsetNumber)
static OffsetNumber PageGetMaxOffsetNumber(Page page)
#define CStringGetTextDatum(s)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define PG_GETARG_BYTEA_P(n)
TypeFuncClass get_call_result_type(FunctionCallInfo fcinfo, Oid *resultTypeId, TupleDesc *resultTupleDesc)
#define SRF_IS_FIRSTCALL()
#define SRF_PERCALL_SETUP()
#define SRF_RETURN_NEXT(_funcctx, _result)
#define SRF_FIRSTCALL_INIT()
static Datum HeapTupleGetDatum(const HeapTupleData *tuple)
#define SRF_RETURN_DONE(_funcctx)
#define HeapTupleHeaderGetOidOld(tup)
static char * bits_to_text(bits8 *bits, int len)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
HeapTupleHeaderData * HeapTupleHeader
#define HeapTupleHeaderGetNatts(tup)
#define SizeofHeapTupleHeader
#define HeapTupleHeaderGetRawXmin(tup)
#define HeapTupleHeaderGetRawXmax(tup)
#define HeapTupleHeaderGetRawCommandId(tup)
#define ItemIdGetLength(itemId)
#define ItemIdGetOffset(itemId)
#define ItemIdGetFlags(itemId)
#define ItemIdHasStorage(itemId)
#define FirstOffsetNumber
static Datum PointerGetDatum(const void *X)
static Datum UInt16GetDatum(uint16 X)
static Datum UInt8GetDatum(uint8 X)
static Datum UInt32GetDatum(uint32 X)
MemoryContextSwitchTo(old_ctx)
MemoryContext multi_call_memory_ctx
#define SET_VARSIZE(PTR, len)
References BITMAPLEN, BITS_PER_BYTE, bits_to_text(), FuncCallContext::call_cntr, CStringGetTextDatum, elog, ereport, errcode(), errmsg(), ERROR, FirstOffsetNumber, get_call_result_type(), heap_form_tuple(), HEAP_HASNULL, HEAP_HASOID_OLD, HeapTupleGetDatum(), HeapTupleHeaderGetNatts, HeapTupleHeaderGetOidOld, HeapTupleHeaderGetRawCommandId, HeapTupleHeaderGetRawXmax, HeapTupleHeaderGetRawXmin, i, ItemIdGetFlags, ItemIdGetLength, ItemIdGetOffset, ItemIdHasStorage, FuncCallContext::max_calls, MAXALIGN, MemoryContextSwitchTo(), MinHeapTupleSize, FuncCallContext::multi_call_memory_ctx, heap_page_items_state::offset, heap_page_items_state::page, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), palloc(), PG_GETARG_BYTEA_P, PointerGetDatum(), SET_VARSIZE, SizeofHeapTupleHeader, SizeOfPageHeaderData, SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, superuser(), HeapTupleHeaderData::t_bits, HeapTupleHeaderData::t_ctid, HeapTupleHeaderData::t_hoff, HeapTupleHeaderData::t_infomask, HeapTupleHeaderData::t_infomask2, heap_page_items_state::tupd, TYPEFUNC_COMPOSITE, UInt16GetDatum(), UInt32GetDatum(), UInt8GetDatum(), FuncCallContext::user_fctx, values, VARDATA, VARHDRSZ, and VARSIZE.