mirror of https://github.com/postgres/postgres
In the same spirit aspull/195/head969bbd0fa
,13e3796c9
,3f323eba8
. Tom Lane and Ronan Dunklau Discussion: https://postgr.es/m/3316564.aeNJFYEL58@aivenlaptop
parent
667368fd26
commit
68ff25eef1
@ -0,0 +1,74 @@ |
||||
/* contrib/pageinspect/pageinspect--1.12--1.13.sql */ |
||||
|
||||
-- complain if script is sourced in psql, rather than via ALTER EXTENSION |
||||
\echo Use "ALTER EXTENSION pageinspect UPDATE TO '1.13'" to load this file. \quit |
||||
|
||||
-- Convert SQL functions to new style |
||||
|
||||
CREATE OR REPLACE FUNCTION heap_page_item_attrs( |
||||
IN page bytea, |
||||
IN rel_oid regclass, |
||||
IN do_detoast bool, |
||||
OUT lp smallint, |
||||
OUT lp_off smallint, |
||||
OUT lp_flags smallint, |
||||
OUT lp_len smallint, |
||||
OUT t_xmin xid, |
||||
OUT t_xmax xid, |
||||
OUT t_field3 int4, |
||||
OUT t_ctid tid, |
||||
OUT t_infomask2 integer, |
||||
OUT t_infomask integer, |
||||
OUT t_hoff smallint, |
||||
OUT t_bits text, |
||||
OUT t_oid oid, |
||||
OUT t_attrs bytea[] |
||||
) |
||||
RETURNS SETOF record |
||||
LANGUAGE SQL PARALLEL RESTRICTED |
||||
BEGIN ATOMIC |
||||
SELECT lp, |
||||
lp_off, |
||||
lp_flags, |
||||
lp_len, |
||||
t_xmin, |
||||
t_xmax, |
||||
t_field3, |
||||
t_ctid, |
||||
t_infomask2, |
||||
t_infomask, |
||||
t_hoff, |
||||
t_bits, |
||||
t_oid, |
||||
tuple_data_split( |
||||
rel_oid::oid, |
||||
t_data, |
||||
t_infomask, |
||||
t_infomask2, |
||||
t_bits, |
||||
do_detoast) |
||||
AS t_attrs |
||||
FROM heap_page_items(page); |
||||
END; |
||||
|
||||
CREATE OR REPLACE FUNCTION heap_page_item_attrs(IN page bytea, IN rel_oid regclass, |
||||
OUT lp smallint, |
||||
OUT lp_off smallint, |
||||
OUT lp_flags smallint, |
||||
OUT lp_len smallint, |
||||
OUT t_xmin xid, |
||||
OUT t_xmax xid, |
||||
OUT t_field3 int4, |
||||
OUT t_ctid tid, |
||||
OUT t_infomask2 integer, |
||||
OUT t_infomask integer, |
||||
OUT t_hoff smallint, |
||||
OUT t_bits text, |
||||
OUT t_oid oid, |
||||
OUT t_attrs bytea[] |
||||
) |
||||
RETURNS SETOF record |
||||
LANGUAGE SQL PARALLEL RESTRICTED |
||||
BEGIN ATOMIC |
||||
SELECT * FROM heap_page_item_attrs(page, rel_oid, false); |
||||
END; |
@ -1,5 +1,5 @@ |
||||
# pageinspect extension |
||||
comment = 'inspect the contents of database pages at a low level' |
||||
default_version = '1.12' |
||||
default_version = '1.13' |
||||
module_pathname = '$libdir/pageinspect' |
||||
relocatable = true |
||||
|
Loading…
Reference in new issue