1/* contrib/pageinspect/pageinspect--1.5--1.6.sql */ 2 3-- complain if script is sourced in psql, rather than via ALTER EXTENSION 4\echo Use "ALTER EXTENSION pageinspect UPDATE TO '1.6'" to load this file. \quit 5 6-- 7-- HASH functions 8-- 9 10-- 11-- hash_page_type() 12-- 13CREATE FUNCTION hash_page_type(IN page bytea) 14RETURNS text 15AS 'MODULE_PATHNAME', 'hash_page_type' 16LANGUAGE C STRICT PARALLEL SAFE; 17 18-- 19-- hash_page_stats() 20-- 21CREATE FUNCTION hash_page_stats(IN page bytea, 22 OUT live_items int4, 23 OUT dead_items int4, 24 OUT page_size int4, 25 OUT free_size int4, 26 OUT hasho_prevblkno int8, 27 OUT hasho_nextblkno int8, 28 OUT hasho_bucket int8, 29 OUT hasho_flag int4, 30 OUT hasho_page_id int4) 31AS 'MODULE_PATHNAME', 'hash_page_stats' 32LANGUAGE C STRICT PARALLEL SAFE; 33 34-- 35-- hash_page_items() 36-- 37CREATE FUNCTION hash_page_items(IN page bytea, 38 OUT itemoffset int4, 39 OUT ctid tid, 40 OUT data int8) 41RETURNS SETOF record 42AS 'MODULE_PATHNAME', 'hash_page_items' 43LANGUAGE C STRICT PARALLEL SAFE; 44 45-- 46-- hash_bitmap_info() 47-- 48CREATE FUNCTION hash_bitmap_info(IN index_oid regclass, IN blkno int8, 49 OUT bitmapblkno int8, 50 OUT bitmapbit int4, 51 OUT bitstatus bool) 52RETURNS SETOF record 53AS 'MODULE_PATHNAME', 'hash_bitmap_info' 54LANGUAGE C STRICT PARALLEL SAFE; 55 56-- 57-- hash_metapage_info() 58-- 59CREATE FUNCTION hash_metapage_info(IN page bytea, 60 OUT magic int8, 61 OUT version int8, 62 OUT ntuples double precision, 63 OUT ffactor int4, 64 OUT bsize int4, 65 OUT bmsize int4, 66 OUT bmshift int4, 67 OUT maxbucket int8, 68 OUT highmask int8, 69 OUT lowmask int8, 70 OUT ovflpoint int8, 71 OUT firstfree int8, 72 OUT nmaps int8, 73 OUT procid oid, 74 OUT spares int8[], 75 OUT mapp int8[]) 76AS 'MODULE_PATHNAME', 'hash_metapage_info' 77LANGUAGE C STRICT PARALLEL SAFE; 78 79-- 80-- page_checksum() 81-- 82CREATE FUNCTION page_checksum(IN page bytea, IN blkno int4) 83RETURNS smallint 84AS 'MODULE_PATHNAME', 'page_checksum' 85LANGUAGE C STRICT PARALLEL SAFE; 86 87-- 88-- bt_page_items_bytea() 89-- 90CREATE FUNCTION bt_page_items(IN page bytea, 91 OUT itemoffset smallint, 92 OUT ctid tid, 93 OUT itemlen smallint, 94 OUT nulls bool, 95 OUT vars bool, 96 OUT data text) 97RETURNS SETOF record 98AS 'MODULE_PATHNAME', 'bt_page_items_bytea' 99LANGUAGE C STRICT PARALLEL SAFE; 100