mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
pageinspect: Add tests
This commit is contained in:
17
contrib/pageinspect/sql/btree.sql
Normal file
17
contrib/pageinspect/sql/btree.sql
Normal file
@ -0,0 +1,17 @@
|
||||
CREATE TABLE test1 (a int, b text);
|
||||
INSERT INTO test1 VALUES (1, 'one');
|
||||
CREATE INDEX test1_a_idx ON test1 USING btree (a);
|
||||
|
||||
\x
|
||||
|
||||
SELECT * FROM bt_metap('test1_a_idx');
|
||||
|
||||
SELECT * FROM bt_page_stats('test1_a_idx', 0);
|
||||
SELECT * FROM bt_page_stats('test1_a_idx', 1);
|
||||
SELECT * FROM bt_page_stats('test1_a_idx', 2);
|
||||
|
||||
SELECT * FROM bt_page_items('test1_a_idx', 0);
|
||||
SELECT * FROM bt_page_items('test1_a_idx', 1);
|
||||
SELECT * FROM bt_page_items('test1_a_idx', 2);
|
||||
|
||||
DROP TABLE test1;
|
Reference in New Issue
Block a user