summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2016-11-01 16:00:00 +0000
committerPeter Eisentraut2016-11-02 12:45:17 +0000
commit00a86856c1195f3f653672d3b06aa9e4a4aeab82 (patch)
treee8fe66bf97b13f4384a2e8c2515cc063ba1f207e
parent14ee35799f1640f44b3e154adcd7607f9a48307f (diff)
pageinspect: Make page test more portable
Choose test data that makes the output independent of endianness.
-rw-r--r--contrib/pageinspect/expected/page.out6
-rw-r--r--contrib/pageinspect/sql/page.sql4
2 files changed, 5 insertions, 5 deletions
diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 673a8529a6..13964cd878 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,6 +1,6 @@
CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b text);
-INSERT INTO test1 VALUES (1, 'one');
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
VACUUM test1; -- set up FSM
-- The page contents can vary, so just test that it can be read
-- 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
FROM heap_page_items(get_raw_page('test1', 0));
tuple_data_split
-------------------------------
- {"\\x01000000","\\x096f6e65"}
+ {"\\x01000001","\\x00020200"}
(1 row)
SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index a304151f07..97eef9829a 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,7 +1,7 @@
CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b text);
-INSERT INTO test1 VALUES (1, 'one');
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
VACUUM test1; -- set up FSM