|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/hash.h"#include "access/htup_details.h"#include "access/relation.h"#include "catalog/pg_am.h"#include "catalog/pg_type.h"#include "funcapi.h"#include "miscadmin.h"#include "pageinspect.h"#include "utils/array.h"#include "utils/builtins.h"#include "utils/rel.h"
Go to the source code of this file.
Data Structures | |
| struct | HashPageStat |
| struct | user_args |
Macros | |
| #define | IS_INDEX(r) ((r)->rd_rel->relkind == RELKIND_INDEX) |
| #define | IS_HASH(r) ((r)->rd_rel->relam == HASH_AM_OID) |
Typedefs | |
| typedef struct HashPageStat | HashPageStat |
| #define IS_HASH | ( | r | ) | ((r)->rd_rel->relam == HASH_AM_OID) |
Definition at line 32 of file hashfuncs.c.
| #define IS_INDEX | ( | r | ) | ((r)->rd_rel->relkind == RELKIND_INDEX) |
Definition at line 31 of file hashfuncs.c.
|
static |
Definition at line 156 of file hashfuncs.c.
References FirstOffsetNumber, HashPageOpaqueData::hasho_bucket, HashPageOpaqueData::hasho_flag, HashPageOpaqueData::hasho_nextblkno, HashPageOpaqueData::hasho_page_id, HashPageOpaqueData::hasho_prevblkno, HashPageGetOpaque, ItemIdIsDead, PageGetFreeSpace(), PageGetItemId(), PageGetMaxOffsetNumber(), and PageGetPageSize().
Referenced by hash_page_stats().
| Datum hash_bitmap_info | ( | PG_FUNCTION_ARGS | ) |
Definition at line 391 of file hashfuncs.c.
References _hash_getbuf(), _hash_ovflblkno_to_bitno(), _hash_relbuf(), AccessShareLock, bit(), BlessTupleDesc(), BMPG_MASK, BMPG_SHIFT, BoolGetDatum(), BufferGetPage(), elog, ereport, errcode(), errmsg(), ERROR, fb(), get_call_result_type(), HASH_METAPAGE, HASH_READ, HashPageGetBitmap, HashPageGetMeta, heap_form_tuple(), HeapTupleGetDatum(), i, Int32GetDatum(), Int64GetDatum(), IS_HASH, IS_INDEX, ISSET, j, LH_BITMAP_PAGE, LH_META_PAGE, MaxBlockNumber, PG_GETARG_INT64, PG_GETARG_OID, PG_RETURN_DATUM, relation_close(), RELATION_IS_OTHER_TEMP, relation_open(), RelationGetNumberOfBlocks, RelationGetRelationName, superuser(), TYPEFUNC_COMPOSITE, and values.
| Datum hash_metapage_info | ( | PG_FUNCTION_ARGS | ) |
Definition at line 519 of file hashfuncs.c.
References BlessTupleDesc(), construct_array_builtin(), elog, ereport, errcode(), errmsg(), ERROR, fb(), Float8GetDatum(), get_call_result_type(), HASH_MAX_BITMAPS, HASH_MAX_SPLITPOINTS, HashPageGetMeta, heap_form_tuple(), HeapTupleGetDatum(), i, Int32GetDatum(), Int64GetDatum(), j, LH_META_PAGE, ObjectIdGetDatum(), user_args::page, PG_GETARG_BYTEA_P, PG_RETURN_DATUM, PointerGetDatum(), superuser(), TYPEFUNC_COMPOSITE, values, and verify_hash_page().
| Datum hash_page_items | ( | PG_FUNCTION_ARGS | ) |
Definition at line 300 of file hashfuncs.c.
References _hash_get_indextuple_hashkey(), BlessTupleDesc(), elog, ereport, errcode(), errmsg(), ERROR, fb(), FirstOffsetNumber, get_call_result_type(), heap_form_tuple(), HeapTupleGetDatum(), Int32GetDatum(), Int64GetDatum(), ItemIdIsValid, j, LH_BUCKET_PAGE, LH_OVERFLOW_PAGE, MemoryContextSwitchTo(), user_args::page, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), palloc_object, PG_GETARG_BYTEA_P, PointerGetDatum(), SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, superuser(), IndexTupleData::t_tid, TupleDescGetAttInMetadata(), TYPEFUNC_COMPOSITE, values, and verify_hash_page().
| Datum hash_page_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 237 of file hashfuncs.c.
References BlessTupleDesc(), elog, ereport, errcode(), errmsg(), ERROR, fb(), get_call_result_type(), GetHashPageStatistics(), heap_form_tuple(), HeapTupleGetDatum(), Int32GetDatum(), Int64GetDatum(), InvalidBlockNumber, j, LH_BUCKET_PAGE, LH_OVERFLOW_PAGE, PG_GETARG_BYTEA_P, PG_RETURN_DATUM, stat, superuser(), TYPEFUNC_COMPOSITE, values, and verify_hash_page().
| Datum hash_page_type | ( | PG_FUNCTION_ARGS | ) |
Definition at line 192 of file hashfuncs.c.
References cstring_to_text(), ereport, errcode(), errmsg(), ERROR, fb(), HashPageOpaqueData::hasho_flag, HashPageGetOpaque, LH_BITMAP_PAGE, LH_BUCKET_PAGE, LH_META_PAGE, LH_OVERFLOW_PAGE, LH_PAGE_TYPE, PageIsNew(), PG_GETARG_BYTEA_P, PG_RETURN_TEXT_P, superuser(), type, and verify_hash_page().
| PG_FUNCTION_INFO_V1 | ( | hash_bitmap_info | ) |
| PG_FUNCTION_INFO_V1 | ( | hash_metapage_info | ) |
| PG_FUNCTION_INFO_V1 | ( | hash_page_items | ) |
| PG_FUNCTION_INFO_V1 | ( | hash_page_stats | ) |
| PG_FUNCTION_INFO_V1 | ( | hash_page_type | ) |
Definition at line 59 of file hashfuncs.c.
References elog, ereport, errcode(), errdetail(), errmsg(), ERROR, fb(), get_page_from_raw(), HASH_MAGIC, HASH_VERSION, HASHO_PAGE_ID, HashPageGetMeta, HashPageGetOpaque, LH_BITMAP_PAGE, LH_BUCKET_PAGE, LH_META_PAGE, LH_OVERFLOW_PAGE, LH_PAGE_TYPE, LH_UNUSED_PAGE, MAXALIGN, PageGetSpecialSize(), and PageIsNew().
Referenced by hash_metapage_info(), hash_page_items(), hash_page_stats(), and hash_page_type().