mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-17 03:23:23 +02:00
Patch by Jesper Pedersen and Ashutosh Sharma, with some error handling improvements by me. Tests from Peter Eisentraut. Reviewed by Álvaro Herrera, Michael Paquier, Jesper Pedersen, Jeff Janes, Peter Eisentraut, Amit Kapila, Mithun Cy, and me. Discussion: http://postgr.es/m/e2ac6c58-b93f-9dd9-f4e6-d6d30add7fdf@redhat.com
50 lines
2.1 KiB
SQL
50 lines
2.1 KiB
SQL
CREATE TABLE test_hash (a int, b text);
|
|
INSERT INTO test_hash VALUES (1, 'one');
|
|
CREATE INDEX test_hash_a_idx ON test_hash USING hash (a);
|
|
|
|
\x
|
|
|
|
SELECT hash_page_type(get_raw_page('test_hash_a_idx', 0));
|
|
SELECT hash_page_type(get_raw_page('test_hash_a_idx', 1));
|
|
SELECT hash_page_type(get_raw_page('test_hash_a_idx', 2));
|
|
SELECT hash_page_type(get_raw_page('test_hash_a_idx', 3));
|
|
SELECT hash_page_type(get_raw_page('test_hash_a_idx', 4));
|
|
SELECT hash_page_type(get_raw_page('test_hash_a_idx', 5));
|
|
SELECT hash_page_type(get_raw_page('test_hash_a_idx', 6));
|
|
|
|
|
|
SELECT * FROM hash_bitmap_info('test_hash_a_idx', 0);
|
|
SELECT * FROM hash_bitmap_info('test_hash_a_idx', 1);
|
|
SELECT * FROM hash_bitmap_info('test_hash_a_idx', 2);
|
|
SELECT * FROM hash_bitmap_info('test_hash_a_idx', 3);
|
|
SELECT * FROM hash_bitmap_info('test_hash_a_idx', 4);
|
|
SELECT * FROM hash_bitmap_info('test_hash_a_idx', 5);
|
|
|
|
|
|
|
|
SELECT * FROM hash_metapage_info(get_raw_page('test_hash_a_idx', 0));
|
|
SELECT * FROM hash_metapage_info(get_raw_page('test_hash_a_idx', 1));
|
|
SELECT * FROM hash_metapage_info(get_raw_page('test_hash_a_idx', 2));
|
|
SELECT * FROM hash_metapage_info(get_raw_page('test_hash_a_idx', 3));
|
|
SELECT * FROM hash_metapage_info(get_raw_page('test_hash_a_idx', 4));
|
|
SELECT * FROM hash_metapage_info(get_raw_page('test_hash_a_idx', 5));
|
|
|
|
|
|
SELECT * FROM hash_page_stats(get_raw_page('test_hash_a_idx', 0));
|
|
SELECT * FROM hash_page_stats(get_raw_page('test_hash_a_idx', 1));
|
|
SELECT * FROM hash_page_stats(get_raw_page('test_hash_a_idx', 2));
|
|
SELECT * FROM hash_page_stats(get_raw_page('test_hash_a_idx', 3));
|
|
SELECT * FROM hash_page_stats(get_raw_page('test_hash_a_idx', 4));
|
|
SELECT * FROM hash_page_stats(get_raw_page('test_hash_a_idx', 5));
|
|
|
|
|
|
SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 0));
|
|
SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 1));
|
|
SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 2));
|
|
SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 3));
|
|
SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 4));
|
|
SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 5));
|
|
|
|
|
|
DROP TABLE test_hash;
|