Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit68ff25e

Browse files
committed
contrib/pageinspect: Use SQL-standard function bodies.
In the same spirit as969bbd0,13e3796,3f323eb.Tom Lane and Ronan DunklauDiscussion:https://postgr.es/m/3316564.aeNJFYEL58@aivenlaptop
1 parent667368f commit68ff25e

File tree

4 files changed

+78
-2
lines changed

4 files changed

+78
-2
lines changed

‎contrib/pageinspect/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ OBJS = \
1313
rawpage.o
1414

1515
EXTENSION = pageinspect
16-
DATA = pageinspect--1.11--1.12.sql pageinspect--1.10--1.11.sql\
16+
DATA = pageinspect--1.12--1.13.sql\
17+
pageinspect--1.11--1.12.sql pageinspect--1.10--1.11.sql\
1718
pageinspect--1.9--1.10.sql pageinspect--1.8--1.9.sql\
1819
pageinspect--1.7--1.8.sql pageinspect--1.6--1.7.sql\
1920
pageinspect--1.5.sql pageinspect--1.5--1.6.sql\

‎contrib/pageinspect/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ install_data(
3737
'pageinspect--1.9--1.10.sql',
3838
'pageinspect--1.10--1.11.sql',
3939
'pageinspect--1.11--1.12.sql',
40+
'pageinspect--1.12--1.13.sql',
4041
'pageinspect.control',
4142
kwargs: contrib_data_args,
4243
)
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/* contrib/pageinspect/pageinspect--1.12--1.13.sql*/
2+
3+
-- complain if script is sourced in psql, rather than via ALTER EXTENSION
4+
\echo Use"ALTER EXTENSION pageinspect UPDATE TO '1.13'" to load this file. \quit
5+
6+
-- Convert SQL functions to new style
7+
8+
CREATE OR REPLACEFUNCTIONheap_page_item_attrs(
9+
IN pagebytea,
10+
IN rel_oid regclass,
11+
IN do_detoast bool,
12+
OUT lpsmallint,
13+
OUT lp_offsmallint,
14+
OUT lp_flagssmallint,
15+
OUT lp_lensmallint,
16+
OUT t_xmin xid,
17+
OUT t_xmax xid,
18+
OUT t_field3 int4,
19+
OUT t_ctid tid,
20+
OUT t_infomask2integer,
21+
OUT t_infomaskinteger,
22+
OUT t_hoffsmallint,
23+
OUT t_bitstext,
24+
OUT t_oidoid,
25+
OUT t_attrsbytea[]
26+
)
27+
RETURNS SETOF record
28+
LANGUAGE SQL PARALLEL RESTRICTED
29+
BEGIN ATOMIC
30+
SELECT lp,
31+
lp_off,
32+
lp_flags,
33+
lp_len,
34+
t_xmin,
35+
t_xmax,
36+
t_field3,
37+
t_ctid,
38+
t_infomask2,
39+
t_infomask,
40+
t_hoff,
41+
t_bits,
42+
t_oid,
43+
tuple_data_split(
44+
rel_oid::oid,
45+
t_data,
46+
t_infomask,
47+
t_infomask2,
48+
t_bits,
49+
do_detoast)
50+
AS t_attrs
51+
FROM heap_page_items(page);
52+
END;
53+
54+
CREATE OR REPLACEFUNCTIONheap_page_item_attrs(IN pagebytea,IN rel_oid regclass,
55+
OUT lpsmallint,
56+
OUT lp_offsmallint,
57+
OUT lp_flagssmallint,
58+
OUT lp_lensmallint,
59+
OUT t_xmin xid,
60+
OUT t_xmax xid,
61+
OUT t_field3 int4,
62+
OUT t_ctid tid,
63+
OUT t_infomask2integer,
64+
OUT t_infomaskinteger,
65+
OUT t_hoffsmallint,
66+
OUT t_bitstext,
67+
OUT t_oidoid,
68+
OUT t_attrsbytea[]
69+
)
70+
RETURNS SETOF record
71+
LANGUAGE SQL PARALLEL RESTRICTED
72+
BEGIN ATOMIC
73+
SELECT*FROM heap_page_item_attrs(page, rel_oid, false);
74+
END;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pageinspect extension
22
comment = 'inspect the contents of database pages at a low level'
3-
default_version = '1.12'
3+
default_version = '1.13'
44
module_pathname = '$libdir/pageinspect'
55
relocatable = true

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp