Skip to content

Commit 00a8685

Browse files
committed
pageinspect: Make page test more portable
Choose test data that makes the output independent of endianness.
1 parent 14ee357 commit 00a8685

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

contrib/pageinspect/expected/page.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CREATE EXTENSION pageinspect;
2-
CREATE TABLE test1 (a int, b text);
3-
INSERT INTO test1 VALUES (1, 'one');
2+
CREATE TABLE test1 (a int, b int);
3+
INSERT INTO test1 VALUES (16777217, 131584);
44
VACUUM test1; -- set up FSM
55
-- The page contents can vary, so just test that it can be read
66
-- 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
4747
FROM heap_page_items(get_raw_page('test1', 0));
4848
tuple_data_split
4949
-------------------------------
50-
{"\\x01000000","\\x096f6e65"}
50+
{"\\x01000001","\\x00020200"}
5151
(1 row)
5252

5353
SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));

contrib/pageinspect/sql/page.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CREATE EXTENSION pageinspect;
22

3-
CREATE TABLE test1 (a int, b text);
4-
INSERT INTO test1 VALUES (1, 'one');
3+
CREATE TABLE test1 (a int, b int);
4+
INSERT INTO test1 VALUES (16777217, 131584);
55

66
VACUUM test1; -- set up FSM
77

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy