PostgreSQL Source Code git master
Loading...
Searching...
No Matches
pageinspect.h File Reference
#include "storage/bufpage.h"
Include dependency graph for pageinspect.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  pageinspect_version { PAGEINSPECT_V1_8 , PAGEINSPECT_V1_9 }
 

Functions

Page get_page_from_raw (bytea *raw_page)
 

Enumeration Type Documentation

◆ pageinspect_version

Enumerator
PAGEINSPECT_V1_8 
PAGEINSPECT_V1_9 

Definition at line 21 of file pageinspect.h.

22{
25};
@ PAGEINSPECT_V1_9
Definition pageinspect.h:24
@ PAGEINSPECT_V1_8
Definition pageinspect.h:23

Function Documentation

◆ get_page_from_raw()

Page get_page_from_raw ( bytea raw_page)
extern

Definition at line 216 of file rawpage.c.

217{
218 Page page;
219 int raw_page_size;
220
222
223 if (raw_page_size != BLCKSZ)
226 errmsg("invalid page size"),
227 errdetail("Expected %d bytes, got %d.",
229
230 page = palloc(raw_page_size);
231
233
234 return page;
235}
PageData * Page
Definition bufpage.h:81
int errcode(int sqlerrcode)
Definition elog.c:874
int errdetail(const char *fmt,...) pg_attribute_printf(1
#define ERROR
Definition elog.h:39
#define ereport(elevel,...)
Definition elog.h:150
void * palloc(Size size)
Definition mcxt.c:1387
static char * errmsg
static int fb(int x)
static Size VARSIZE_ANY_EXHDR(const void *PTR)
Definition varatt.h:472
static char * VARDATA_ANY(const void *PTR)
Definition varatt.h:486

References ereport, errcode(), errdetail(), errmsg, ERROR, fb(), palloc(), VARDATA_ANY(), and VARSIZE_ANY_EXHDR().

Referenced by brin_page_type(), bt_page_items_bytea(), fsm_page_contents(), gin_leafpage_items(), gin_metapage_info(), gin_page_opaque_info(), heap_page_items(), page_checksum_internal(), page_header(), verify_brin_page(), verify_gist_page(), and verify_hash_page().