1 -- test old extension version entry points
2 DROP EXTENSION pageinspect;
3 CREATE EXTENSION pageinspect VERSION '1.8';
4 CREATE TABLE test1 (a int8, b text);
5 INSERT INTO test1 VALUES (72057594037927937, 'text');
6 CREATE INDEX test1_a_idx ON test1 USING btree (a);
8 SELECT octet_length(get_raw_page('test1', 0)) AS main_0;
14 SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
20 SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_test;
27 SELECT * FROM bt_page_stats('test1_a_idx', 1);
28 blkno | type | live_items | dead_items | avg_item_size | page_size | free_size | btpo_prev | btpo_next | btpo | btpo_flags
29 -------+------+------------+------------+---------------+-----------+-----------+-----------+-----------+------+------------
30 1 | l | 1 | 0 | 16 | 8192 | 8128 | 0 | 0 | 0 | 3
33 SELECT * FROM bt_page_items('test1_a_idx', 1);
34 itemoffset | ctid | itemlen | nulls | vars | data | dead | htid | tids
35 ------------+-------+---------+-------+------+-------------------------+------+-------+------
36 1 | (0,1) | 16 | f | f | 01 00 00 00 00 00 00 01 | f | (0,1) |
39 -- page_header() uses int instead of smallint for lower, upper, special and
40 -- pagesize in pageinspect >= 1.10.
41 ALTER EXTENSION pageinspect UPDATE TO '1.9';
44 Schema | Name | Result data type | Argument data types | Type
45 --------+-------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------
46 public | page_header | record | page bytea, OUT lsn pg_lsn, OUT checksum smallint, OUT flags smallint, OUT lower smallint, OUT upper smallint, OUT special smallint, OUT pagesize smallint, OUT version smallint, OUT prune_xid xid | func
49 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
56 DROP EXTENSION pageinspect;