Fix pg_dump bug in the database-level collation patch. "datcollate" and
[PostgreSQL.git] / contrib / pageinspect / pageinspect.sql.in
bloba717e7261361b340b6b223a3f2d85d06cd11d44a
1 /* $PostgreSQL$ */
3 -- Adjust this setting to control where the objects get created.
4 SET search_path = public;
6 --
7 -- get_raw_page()
8 --
9 CREATE OR REPLACE FUNCTION get_raw_page(text, int4)
10 RETURNS bytea
11 AS 'MODULE_PATHNAME', 'get_raw_page'
12 LANGUAGE C STRICT;
15 -- page_header()
17 CREATE OR REPLACE FUNCTION page_header(IN page bytea,
18 OUT lsn text,
19 OUT tli smallint,
20 OUT flags smallint,
21 OUT lower smallint,
22 OUT upper smallint,
23 OUT special smallint,
24 OUT pagesize smallint,
25 OUT version smallint,
26 OUT prune_xid xid)
27 AS 'MODULE_PATHNAME', 'page_header'
28 LANGUAGE C STRICT;
31 -- heap_page_items()
33 CREATE OR REPLACE FUNCTION heap_page_items(IN page bytea,
34 OUT lp smallint,
35 OUT lp_off smallint,
36 OUT lp_flags smallint,
37 OUT lp_len smallint,
38 OUT t_xmin xid,
39 OUT t_xmax xid,
40 OUT t_field3 int4,
41 OUT t_ctid tid,
42 OUT t_infomask2 smallint,
43 OUT t_infomask smallint,
44 OUT t_hoff smallint,
45 OUT t_bits text,
46 OUT t_oid oid)
47 RETURNS SETOF record
48 AS 'MODULE_PATHNAME', 'heap_page_items'
49 LANGUAGE C STRICT;
52 -- bt_metap()
54 CREATE OR REPLACE FUNCTION bt_metap(IN relname text,
55 OUT magic int4,
56 OUT version int4,
57 OUT root int4,
58 OUT level int4,
59 OUT fastroot int4,
60 OUT fastlevel int4)
61 AS 'MODULE_PATHNAME', 'bt_metap'
62 LANGUAGE C STRICT;
65 -- bt_page_stats()
67 CREATE OR REPLACE FUNCTION bt_page_stats(IN relname text, IN blkno int4,
68 OUT blkno int4,
69 OUT type "char",
70 OUT live_items int4,
71 OUT dead_items int4,
72 OUT avg_item_size int4,
73 OUT page_size int4,
74 OUT free_size int4,
75 OUT btpo_prev int4,
76 OUT btpo_next int4,
77 OUT btpo int4,
78 OUT btpo_flags int4)
79 AS 'MODULE_PATHNAME', 'bt_page_stats'
80 LANGUAGE C STRICT;
83 -- bt_page_items()
85 CREATE OR REPLACE FUNCTION bt_page_items(IN relname text, IN blkno int4,
86 OUT itemoffset smallint,
87 OUT ctid tid,
88 OUT itemlen smallint,
89 OUT nulls bool,
90 OUT vars bool,
91 OUT data text)
92 RETURNS SETOF record
93 AS 'MODULE_PATHNAME', 'bt_page_items'
94 LANGUAGE C STRICT;