Commit 00a86856 authored by Peter Eisentraut's avatar Peter Eisentraut

pageinspect: Make page test more portable

Choose test data that makes the output independent of endianness.
parent 14ee3579
CREATE EXTENSION pageinspect; CREATE EXTENSION pageinspect;
CREATE TABLE test1 (a int, b text); CREATE TABLE test1 (a int, b int);
INSERT INTO test1 VALUES (1, 'one'); INSERT INTO test1 VALUES (16777217, 131584);
VACUUM test1; -- set up FSM VACUUM test1; -- set up FSM
-- The page contents can vary, so just test that it can be read -- The page contents can vary, so just test that it can be read
-- successfully, but don't keep the output. -- successfully, but don't keep the output.
...@@ -47,7 +47,7 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi ...@@ -47,7 +47,7 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
FROM heap_page_items(get_raw_page('test1', 0)); FROM heap_page_items(get_raw_page('test1', 0));
tuple_data_split tuple_data_split
------------------------------- -------------------------------
{"\\x01000000","\\x096f6e65"} {"\\x01000001","\\x00020200"}
(1 row) (1 row)
SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0)); SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
......
CREATE EXTENSION pageinspect; CREATE EXTENSION pageinspect;
CREATE TABLE test1 (a int, b text); CREATE TABLE test1 (a int, b int);
INSERT INTO test1 VALUES (1, 'one'); INSERT INTO test1 VALUES (16777217, 131584);
VACUUM test1; -- set up FSM VACUUM test1; -- set up FSM
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment