PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/brin.h"
#include "access/brin_internal.h"
#include "access/brin_page.h"
#include "access/brin_revmap.h"
#include "access/brin_tuple.h"
#include "access/htup_details.h"
#include "catalog/index.h"
#include "catalog/pg_am_d.h"
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "pageinspect.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
Go to the source code of this file.
Data Structures | |
struct | brin_column_state |
Macros | |
#define | IS_BRIN(r) ((r)->rd_rel->relam == BRIN_AM_OID) |
Typedefs | |
typedef struct brin_column_state | brin_column_state |
Functions | |
PG_FUNCTION_INFO_V1 (brin_page_type) | |
PG_FUNCTION_INFO_V1 (brin_page_items) | |
PG_FUNCTION_INFO_V1 (brin_metapage_info) | |
PG_FUNCTION_INFO_V1 (brin_revmap_data) | |
static Page | verify_brin_page (bytea *raw_page, uint16 type, const char *strtype) |
Datum | brin_page_type (PG_FUNCTION_ARGS) |
Datum | brin_page_items (PG_FUNCTION_ARGS) |
Datum | brin_metapage_info (PG_FUNCTION_ARGS) |
Datum | brin_revmap_data (PG_FUNCTION_ARGS) |
#define IS_BRIN | ( | r | ) | ((r)->rd_rel->relam == BRIN_AM_OID) |
Definition at line 35 of file brinfuncs.c.
typedef struct brin_column_state brin_column_state |
Datum brin_metapage_info | ( | PG_FUNCTION_ARGS | ) |
Definition at line 330 of file brinfuncs.c.
References BlessTupleDesc(), BRIN_PAGETYPE_META, BrinMetaPageData::brinMagic, BrinMetaPageData::brinVersion, CStringGetTextDatum, elog, ereport, errcode(), errmsg(), ERROR, get_call_result_type(), heap_form_tuple(), HeapTupleGetDatum(), Int32GetDatum(), Int64GetDatum(), BrinMetaPageData::lastRevmapPage, PageGetContents(), PageIsNew(), BrinMetaPageData::pagesPerRange, PG_GETARG_BYTEA_P, PG_RETURN_DATUM, PG_RETURN_NULL, psprintf(), superuser(), TYPEFUNC_COMPOSITE, values, and verify_brin_page().
Datum brin_page_items | ( | PG_FUNCTION_ARGS | ) |
Definition at line 131 of file brinfuncs.c.
References AccessShareLock, appendStringInfoChar(), appendStringInfoString(), BoolGetDatum(), brin_build_desc(), brin_deform_tuple(), brin_free_desc(), BRIN_PAGETYPE_REGULAR, BrinValues::bv_values, CStringGetTextDatum, StringInfoData::data, elog, ereport, errcode(), errmsg(), ERROR, FirstOffsetNumber, fmgr_info(), getTypeOutputInfo(), i, if(), index_close(), index_open(), InitMaterializedSRF(), initStringInfo(), Int64GetDatum(), IS_BRIN, ItemIdIsUsed, brin_column_state::nstored, OffsetNumberNext, BrinOpcInfo::oi_nstored, BrinOpcInfo::oi_typcache, output, brin_column_state::outputFn, OutputFunctionCall(), PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageIsNew(), palloc(), pfree(), PG_GETARG_BYTEA_P, PG_GETARG_OID, PG_RETURN_NULL, RelationGetDescr, RelationGetRelationName, ReturnSetInfo::setDesc, ReturnSetInfo::setResult, superuser(), TupleDescAttr, tuplestore_putvalues(), TypeCacheEntry::type_id, UInt16GetDatum(), UInt32GetDatum(), val, values, and verify_brin_page().
Datum brin_page_type | ( | PG_FUNCTION_ARGS | ) |
Definition at line 48 of file brinfuncs.c.
References BRIN_PAGETYPE_META, BRIN_PAGETYPE_REGULAR, BRIN_PAGETYPE_REVMAP, BrinPageType, cstring_to_text(), ereport, errcode(), errdetail(), errmsg(), ERROR, get_page_from_raw(), MAXALIGN, PageGetSpecialSize(), PageIsNew(), PG_GETARG_BYTEA_P, PG_RETURN_NULL, PG_RETURN_TEXT_P, psprintf(), superuser(), and type.
Datum brin_revmap_data | ( | PG_FUNCTION_ARGS | ) |
Definition at line 371 of file brinfuncs.c.
References BRIN_PAGETYPE_REVMAP, ereport, errcode(), errmsg(), ERROR, idx(), MemoryContextSwitchTo(), FuncCallContext::multi_call_memory_ctx, PageGetContents(), PageIsNew(), palloc(), PG_GETARG_BYTEA_P, PG_RETURN_NULL, PointerGetDatum(), REVMAP_PAGE_MAXITEMS, SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, superuser(), FuncCallContext::user_fctx, and verify_brin_page().
PG_FUNCTION_INFO_V1 | ( | brin_metapage_info | ) |
PG_FUNCTION_INFO_V1 | ( | brin_page_items | ) |
PG_FUNCTION_INFO_V1 | ( | brin_page_type | ) |
PG_FUNCTION_INFO_V1 | ( | brin_revmap_data | ) |
Definition at line 97 of file brinfuncs.c.
References BrinPageType, ereport, errcode(), errdetail(), errmsg(), ERROR, get_page_from_raw(), MAXALIGN, PageGetSpecialSize(), PageIsNew(), and type.
Referenced by brin_metapage_info(), brin_page_items(), and brin_revmap_data().