1/* contrib/pageinspect/pageinspect--1.2--1.3.sql */
2
3-- complain if script is sourced in psql, rather than via ALTER EXTENSION
4\echo Use "ALTER EXTENSION pageinspect UPDATE TO '1.3'" to load this file. \quit
5
6--
7-- brin_page_type()
8--
9CREATE FUNCTION brin_page_type(IN page bytea)
10RETURNS text
11AS 'MODULE_PATHNAME', 'brin_page_type'
12LANGUAGE C STRICT;
13
14--
15-- brin_metapage_info()
16--
17CREATE FUNCTION brin_metapage_info(IN page bytea, OUT magic text,
18	OUT version integer, OUT pagesperrange integer, OUT lastrevmappage bigint)
19AS 'MODULE_PATHNAME', 'brin_metapage_info'
20LANGUAGE C STRICT;
21
22--
23-- brin_revmap_data()
24--
25CREATE FUNCTION brin_revmap_data(IN page bytea,
26	OUT pages tid)
27RETURNS SETOF tid
28AS 'MODULE_PATHNAME', 'brin_revmap_data'
29LANGUAGE C STRICT;
30
31--
32-- brin_page_items()
33--
34CREATE FUNCTION brin_page_items(IN page bytea, IN index_oid regclass,
35	OUT itemoffset int,
36	OUT blknum int,
37	OUT attnum int,
38	OUT allnulls bool,
39	OUT hasnulls bool,
40	OUT placeholder bool,
41	OUT value text)
42RETURNS SETOF record
43AS 'MODULE_PATHNAME', 'brin_page_items'
44LANGUAGE C STRICT;
45
46--
47-- gin_metapage_info()
48--
49CREATE FUNCTION gin_metapage_info(IN page bytea,
50    OUT pending_head bigint,
51    OUT pending_tail bigint,
52    OUT tail_free_size int4,
53    OUT n_pending_pages bigint,
54    OUT n_pending_tuples bigint,
55    OUT n_total_pages bigint,
56    OUT n_entry_pages bigint,
57    OUT n_data_pages bigint,
58    OUT n_entries bigint,
59    OUT version int4)
60AS 'MODULE_PATHNAME', 'gin_metapage_info'
61LANGUAGE C STRICT;
62
63--
64-- gin_page_opaque_info()
65--
66CREATE FUNCTION gin_page_opaque_info(IN page bytea,
67    OUT rightlink bigint,
68    OUT maxoff int4,
69    OUT flags text[])
70AS 'MODULE_PATHNAME', 'gin_page_opaque_info'
71LANGUAGE C STRICT;
72
73--
74-- gin_leafpage_items()
75--
76CREATE FUNCTION gin_leafpage_items(IN page bytea,
77    OUT first_tid tid,
78    OUT nbytes int2,
79    OUT tids tid[])
80RETURNS SETOF record
81AS 'MODULE_PATHNAME', 'gin_leafpage_items'
82LANGUAGE C STRICT;
83