5 | (0,5) | 40 | (p)=((5,5))
(5 rows)
-SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 2), 'test_gist_idx') LIMIT 5;
- itemoffset | ctid | itemlen | keys
-------------+--------+---------+-----------------
- 1 | (1,10) | 40 | (p)=((167,167))
- 2 | (1,11) | 40 | (p)=((168,168))
- 3 | (1,12) | 40 | (p)=((169,169))
- 4 | (1,13) | 40 | (p)=((170,170))
- 5 | (1,14) | 40 | (p)=((171,171))
-(5 rows)
-
-SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 0));
- itemoffset | ctid | itemlen | key_data
-------------+-----------+---------+------------------------------------------------------------------------------------
- 1 | (1,65535) | 40 | \x00000100ffff28000000000000c064400000000000c06440000000000000f03f000000000000f03f
- 2 | (2,65535) | 40 | \x00000200ffff28000000000000c074400000000000c074400000000000e064400000000000e06440
- 3 | (3,65535) | 40 | \x00000300ffff28000000000000207f400000000000207f400000000000d074400000000000d07440
- 4 | (4,65535) | 40 | \x00000400ffff28000000000000c084400000000000c084400000000000307f400000000000307f40
- 5 | (5,65535) | 40 | \x00000500ffff28000000000000f089400000000000f089400000000000c884400000000000c88440
- 6 | (6,65535) | 40 | \x00000600ffff28000000000000208f400000000000208f400000000000f889400000000000f88940
- 7 | (7,65535) | 40 | \x00000700ffff28000000000000408f400000000000408f400000000000288f400000000000288f40
+-- gist_page_items_bytea prints the raw key data as a bytea. The output of that is
+-- platform-dependent (endianess), so omit the actual key data from the output.
+SELECT itemoffset, ctid, itemlen FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 0));
+ itemoffset | ctid | itemlen
+------------+-----------+---------
+ 1 | (1,65535) | 40
+ 2 | (2,65535) | 40
+ 3 | (3,65535) | 40
+ 4 | (4,65535) | 40
+ 5 | (5,65535) | 40
+ 6 | (6,65535) | 40
+ 7 | (7,65535) | 40
(7 rows)
-SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 1)) LIMIT 5;
- itemoffset | ctid | itemlen | key_data
-------------+-------+---------+------------------------------------------------------------------------------------
- 1 | (0,1) | 40 | \x0000000001002800000000000000f03f000000000000f03f000000000000f03f000000000000f03f
- 2 | (0,2) | 40 | \x00000000020028000000000000000040000000000000004000000000000000400000000000000040
- 3 | (0,3) | 40 | \x00000000030028000000000000000840000000000000084000000000000008400000000000000840
- 4 | (0,4) | 40 | \x00000000040028000000000000001040000000000000104000000000000010400000000000001040
- 5 | (0,5) | 40 | \x00000000050028000000000000001440000000000000144000000000000014400000000000001440
-(5 rows)
-
-SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 2)) LIMIT 5;
- itemoffset | ctid | itemlen | key_data
-------------+--------+---------+------------------------------------------------------------------------------------
- 1 | (1,10) | 40 | \x000001000a0028000000000000e064400000000000e064400000000000e064400000000000e06440
- 2 | (1,11) | 40 | \x000001000b0028000000000000006540000000000000654000000000000065400000000000006540
- 3 | (1,12) | 40 | \x000001000c0028000000000000206540000000000020654000000000002065400000000000206540
- 4 | (1,13) | 40 | \x000001000d0028000000000000406540000000000040654000000000004065400000000000406540
- 5 | (1,14) | 40 | \x000001000e0028000000000000606540000000000060654000000000006065400000000000606540
-(5 rows)
-
DROP TABLE test_gist;
SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 0), 'test_gist_idx');
SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 1), 'test_gist_idx') LIMIT 5;
-SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 2), 'test_gist_idx') LIMIT 5;
-SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 0));
-SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 1)) LIMIT 5;
-SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 2)) LIMIT 5;
+-- gist_page_items_bytea prints the raw key data as a bytea. The output of that is
+-- platform-dependent (endianess), so omit the actual key data from the output.
+SELECT itemoffset, ctid, itemlen FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 0));
DROP TABLE test_gist;