Content-Length: 298312 | pFad | http://github.com/postgrespro/postgres/commit/f7c9a6e083da3f64e7440a31960b837353514262

52 pageinspect: Make btree test more portable · postgrespro/postgres@f7c9a6e · GitHub
Skip to content

Commit f7c9a6e

Browse files
committed
pageinspect: Make btree test more portable
Choose test data that makes the output independent of endianness and alignment.
1 parent 9779f71 commit f7c9a6e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

contrib/pageinspect/expected/btree.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
CREATE TABLE test1 (a int, b text);
2-
INSERT INTO test1 VALUES (1, 'one');
1+
CREATE TABLE test1 (a int8, b text);
2+
INSERT INTO test1 VALUES (72057594037927937, 'text');
33
CREATE INDEX test1_a_idx ON test1 USING btree (a);
44
\x
55
SELECT * FROM bt_metap('test1_a_idx');
@@ -38,7 +38,7 @@ ctid | (0,1)
3838
itemlen | 16
3939
nulls | f
4040
vars | f
41-
data | 01 00 00 00 00 00 00 00
41+
data | 01 00 00 00 00 00 00 01
4242

4343
SELECT * FROM bt_page_items('test1_a_idx', 2);
4444
ERROR: block number out of range

contrib/pageinspect/sql/btree.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
CREATE TABLE test1 (a int, b text);
2-
INSERT INTO test1 VALUES (1, 'one');
1+
CREATE TABLE test1 (a int8, b text);
2+
INSERT INTO test1 VALUES (72057594037927937, 'text');
33
CREATE INDEX test1_a_idx ON test1 USING btree (a);
44

55
\x

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/f7c9a6e083da3f64e7440a31960b837353514262

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy