aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2021-01-19 10:28:05 +0100
committerPeter Eisentraut <peter@eisentraut.org>2021-01-19 11:03:38 +0100
commitf18aa1b203930ed28cfe42e82d3418ae6277576d (patch)
treec9c4c17d1e22214edf815df2cd1f865a65065278 /doc/src
parentee79a548e746da9a99df0cac70a3ddc095f2829a (diff)
downloadpostgresql-f18aa1b203930ed28cfe42e82d3418ae6277576d.tar.gz
postgresql-f18aa1b203930ed28cfe42e82d3418ae6277576d.zip
pageinspect: Change block number arguments to bigint
Block numbers are 32-bit unsigned integers. Therefore, the smallest SQL integer type that they can fit in is bigint. However, in the pageinspect module, most input and output parameters dealing with block numbers were declared as int. The behavior with block numbers larger than a signed 32-bit integer was therefore dubious. Change these arguments to type bigint and add some more explicit error checking on the block range. (Other contrib modules appear to do this correctly already.) Since we are changing argument types of existing functions, in order to not misbehave if the binary is updated before the extension is updated, we need to create new C symbols for the entry points, similar to how it's done in other extensions as well. Reported-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/flat/d8f6bdd536df403b9b33816e9f7e0b9d@G08CNEXMBPEKD05.g08.fujitsu.local
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/pageinspect.sgml12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/src/sgml/pageinspect.sgml b/doc/src/sgml/pageinspect.sgml
index 35858e15576..0cad08a8a7e 100644
--- a/doc/src/sgml/pageinspect.sgml
+++ b/doc/src/sgml/pageinspect.sgml
@@ -19,7 +19,7 @@
<variablelist>
<varlistentry>
<term>
- <function>get_raw_page(relname text, fork text, blkno int) returns bytea</function>
+ <function>get_raw_page(relname text, fork text, blkno bigint) returns bytea</function>
<indexterm>
<primary>get_raw_page</primary>
</indexterm>
@@ -40,7 +40,7 @@
<varlistentry>
<term>
- <function>get_raw_page(relname text, blkno int) returns bytea</function>
+ <function>get_raw_page(relname text, blkno bigint) returns bytea</function>
</term>
<listitem>
@@ -91,7 +91,7 @@ test=# SELECT * FROM page_header(get_raw_page('pg_class', 0));
<varlistentry>
<term>
- <function>page_checksum(page bytea, blkno int4) returns smallint</function>
+ <function>page_checksum(page bytea, blkno bigint) returns smallint</function>
<indexterm>
<primary>page_checksum</primary>
</indexterm>
@@ -315,7 +315,7 @@ allequalimage | f
<varlistentry>
<term>
- <function>bt_page_stats(relname text, blkno int) returns record</function>
+ <function>bt_page_stats(relname text, blkno bigint) returns record</function>
<indexterm>
<primary>bt_page_stats</primary>
</indexterm>
@@ -346,7 +346,7 @@ btpo_flags | 3
<varlistentry>
<term>
- <function>bt_page_items(relname text, blkno int) returns setof record</function>
+ <function>bt_page_items(relname text, blkno bigint) returns setof record</function>
<indexterm>
<primary>bt_page_items</primary>
</indexterm>
@@ -845,7 +845,7 @@ test=# SELECT * FROM hash_page_items(get_raw_page('con_hash_index', 1)) LIMIT 5;
<varlistentry>
<term>
- <function>hash_bitmap_info(index oid, blkno int) returns record</function>
+ <function>hash_bitmap_info(index oid, blkno bigint) returns record</function>
<indexterm>
<primary>hash_bitmap_info</primary>
</indexterm>