summaryrefslogtreecommitdiff
path: root/contrib/pageinspect
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-03-17 09:23:39 -0400
committerPeter Eisentraut <peter_e@gmx.net>2017-03-17 09:23:39 -0400
commita02731cb10535a6d5f66447295e7b8e22807f471 (patch)
treef2f689b786b54bdb063316b69ed50de3045b0701 /contrib/pageinspect
parentaa7464d949bf69ce1e8697f77400ff6b7ebb2d18 (diff)
downloadpostgresql-a02731cb10535a6d5f66447295e7b8e22807f471.tar.gz
pageinspect: Add test for page_header function
Diffstat (limited to 'contrib/pageinspect')
-rw-r--r--contrib/pageinspect/expected/page.out6
-rw-r--r--contrib/pageinspect/sql/page.sql2
2 files changed, 8 insertions, 0 deletions
diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 9eaeda3a27..08599af774 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -43,6 +43,12 @@ SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
t
(1 row)
+SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
+ pagesize | version
+----------+---------
+ 8192 | 4
+(1 row)
+
SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
FROM heap_page_items(get_raw_page('test1', 0));
tuple_data_split
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 6b2e6b79a2..53e9f8022d 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -22,6 +22,8 @@ SELECT octet_length(get_raw_page('test1', 'xxx', 0));
SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
+
SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
FROM heap_page_items(get_raw_page('test1', 0));