Skip to content

Commit 8e305a5

Browse files
author
Arseny Kositsyn
committed
[PGPRO-12159] Cosmetic fixes.
Tags: rum
1 parent 1b142f1 commit 8e305a5

File tree

5 files changed

+399
-396
lines changed

5 files changed

+399
-396
lines changed

expected/rum_debug_funcs.out

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CREATE TABLE test_debug_table (id int, t tsvector, d timestamp);
88
DO $$
99
BEGIN
1010
FOR i IN 1..5000 LOOP
11-
INSERT INTO test_debug_table(id, t, d)
11+
INSERT INTO test_debug_table(id, t, d)
1212
VALUES(i, 'b9', '2016-05-02 00:21:22.326724');
1313
END LOOP;
1414
END;
@@ -4363,8 +4363,8 @@ SELECT * FROM rum_leaf_data_page_items('test_without_addinfo_idx', 9);
43634363
(2605 rows)
43644364

43654365
-- Testing on the index with additional information (order_by_attach = false)
4366-
CREATE INDEX test_with_addinfo_idx_false ON test_debug_table
4367-
USING rum (t rum_tsvector_addon_ops, d)
4366+
CREATE INDEX test_with_addinfo_idx_false ON test_debug_table
4367+
USING rum (t rum_tsvector_addon_ops, d)
43684368
WITH (attach = 'd', to = 't', order_by_attach='f');
43694369
SELECT * FROM rum_metapage_info('test_with_addinfo_idx_false', 0) \gx
43704370
-[ RECORD 1 ]----+-----------
@@ -6588,8 +6588,8 @@ SELECT * FROM rum_leaf_data_page_items('test_with_addinfo_idx_false', 27);
65886588
(451 rows)
65896589

65906590
-- Testing on 32-bit and 64-bit on the index with additional information (order_by_attach = true)
6591-
CREATE INDEX test_with_addinfo_idx_true ON test_debug_table
6592-
USING rum (t rum_tsvector_addon_ops, id)
6591+
CREATE INDEX test_with_addinfo_idx_true ON test_debug_table
6592+
USING rum (t rum_tsvector_addon_ops, id)
65936593
WITH (attach = 'id', to = 't', order_by_attach='t');
65946594
SELECT * FROM rum_metapage_info('test_with_addinfo_idx_true', 0) \gx
65956595
-[ RECORD 1 ]----+-----------
@@ -8034,12 +8034,12 @@ FOR EACH ROW EXECUTE PROCEDURE fill_test_debug_weight_trigger();
80348034
DO $$
80358035
BEGIN
80368036
FOR i IN 1..5000 LOOP
8037-
INSERT INTO test_debug_table_with_weight(t,r)
8037+
INSERT INTO test_debug_table_with_weight(t,r)
80388038
VALUES('As a reward for your reformation I write to you on this precious sheet.', 'write');
80398039
END LOOP;
80408040
END;
80418041
$$;
8042-
CREATE INDEX test_with_weight_idx ON test_debug_table_with_weight
8042+
CREATE INDEX test_with_weight_idx ON test_debug_table_with_weight
80438043
USING rum (a rum_tsvector_ops);
80448044
SELECT * FROM rum_metapage_info('test_with_weight_idx', 0) \gx
80458045
-[ RECORD 1 ]----+-----------

rum--1.3--1.4.sql

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -38,63 +38,63 @@ AS 'MODULE_PATHNAME', 'rum_page_items_info'
3838
LANGUAGE C STRICT;
3939

4040
CREATE FUNCTION rum_leaf_data_page_items(
41-
rel_name text,
41+
rel_name text,
4242
blk_num int4
4343
)
4444
RETURNS TABLE(
45-
is_high_key bool,
46-
tuple_id tid,
47-
add_info_is_null bool,
45+
is_high_key bool,
46+
tuple_id tid,
47+
add_info_is_null bool,
4848
add_info varchar
49-
)
49+
)
5050
AS $$
51-
SELECT *
51+
SELECT *
5252
FROM rum_page_items_info(rel_name, blk_num, 0)
5353
AS rum_page_items_info(
54-
is_high_key bool,
55-
tuple_id tid,
56-
add_info_is_null bool,
54+
is_high_key bool,
55+
tuple_id tid,
56+
add_info_is_null bool,
5757
add_info varchar
5858
);
5959
$$ LANGUAGE sql;
6060

6161
CREATE FUNCTION rum_internal_data_page_items(
62-
rel_name text,
62+
rel_name text,
6363
blk_num int4
6464
)
6565
RETURNS TABLE(
66-
is_high_key bool,
67-
block_number int4,
68-
tuple_id tid,
69-
add_info_is_null bool,
66+
is_high_key bool,
67+
block_number int4,
68+
tuple_id tid,
69+
add_info_is_null bool,
7070
add_info varchar
71-
)
71+
)
7272
AS $$
73-
SELECT *
73+
SELECT *
7474
FROM rum_page_items_info(rel_name, blk_num, 1)
7575
AS rum_page_items_info(
76-
is_high_key bool,
77-
block_number int4,
78-
tuple_id tid,
79-
add_info_is_null bool,
76+
is_high_key bool,
77+
block_number int4,
78+
tuple_id tid,
79+
add_info_is_null bool,
8080
add_info varchar
8181
);
8282
$$ LANGUAGE sql;
8383

8484
CREATE FUNCTION rum_leaf_entry_page_items(
85-
rel_name text,
85+
rel_name text,
8686
blk_num int4
8787
)
8888
RETURNS TABLE(
89-
key varchar,
90-
attrnum int4,
91-
category varchar,
92-
tuple_id tid,
93-
add_info_is_null bool,
94-
add_info varchar,
95-
is_postring_tree bool,
89+
key varchar,
90+
attrnum int4,
91+
category varchar,
92+
tuple_id tid,
93+
add_info_is_null bool,
94+
add_info varchar,
95+
is_postring_tree bool,
9696
postring_tree_root int4
97-
)
97+
)
9898
AS $$
9999
SELECT *
100100
FROM rum_page_items_info(rel_name, blk_num, 2)
@@ -111,21 +111,21 @@ AS $$
111111
$$ LANGUAGE sql;
112112

113113
CREATE FUNCTION rum_internal_entry_page_items(
114-
rel_name text,
114+
rel_name text,
115115
blk_num int4
116116
)
117117
RETURNS TABLE(
118-
key varchar,
119-
attrnum int4,
120-
category varchar,
121-
down_link int4)
118+
key varchar,
119+
attrnum int4,
120+
category varchar,
121+
down_link int4)
122122
AS $$
123123
SELECT *
124124
FROM rum_page_items_info(rel_name, blk_num, 3)
125125
AS rum_page_items_info(
126-
key varchar,
127-
attrnum int4,
128-
category varchar,
126+
key varchar,
127+
attrnum int4,
128+
category varchar,
129129
down_link int4
130130
);
131131
$$ LANGUAGE sql;

rum_init.sql

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,63 +1763,63 @@ AS 'MODULE_PATHNAME', 'rum_page_items_info'
17631763
LANGUAGE C STRICT;
17641764

17651765
CREATE FUNCTION rum_leaf_data_page_items(
1766-
rel_name text,
1766+
rel_name text,
17671767
blk_num int4
17681768
)
17691769
RETURNS TABLE(
1770-
is_high_key bool,
1771-
tuple_id tid,
1772-
add_info_is_null bool,
1770+
is_high_key bool,
1771+
tuple_id tid,
1772+
add_info_is_null bool,
17731773
add_info varchar
1774-
)
1774+
)
17751775
AS $$
1776-
SELECT *
1776+
SELECT *
17771777
FROM rum_page_items_info(rel_name, blk_num, 0)
17781778
AS rum_page_items_info(
1779-
is_high_key bool,
1780-
tuple_id tid,
1781-
add_info_is_null bool,
1779+
is_high_key bool,
1780+
tuple_id tid,
1781+
add_info_is_null bool,
17821782
add_info varchar
17831783
);
17841784
$$ LANGUAGE sql;
17851785

17861786
CREATE FUNCTION rum_internal_data_page_items(
1787-
rel_name text,
1787+
rel_name text,
17881788
blk_num int4
17891789
)
17901790
RETURNS TABLE(
1791-
is_high_key bool,
1792-
block_number int4,
1793-
tuple_id tid,
1794-
add_info_is_null bool,
1791+
is_high_key bool,
1792+
block_number int4,
1793+
tuple_id tid,
1794+
add_info_is_null bool,
17951795
add_info varchar
1796-
)
1796+
)
17971797
AS $$
1798-
SELECT *
1798+
SELECT *
17991799
FROM rum_page_items_info(rel_name, blk_num, 1)
18001800
AS rum_page_items_info(
1801-
is_high_key bool,
1802-
block_number int4,
1803-
tuple_id tid,
1804-
add_info_is_null bool,
1801+
is_high_key bool,
1802+
block_number int4,
1803+
tuple_id tid,
1804+
add_info_is_null bool,
18051805
add_info varchar
18061806
);
18071807
$$ LANGUAGE sql;
18081808

18091809
CREATE FUNCTION rum_leaf_entry_page_items(
1810-
rel_name text,
1810+
rel_name text,
18111811
blk_num int4
18121812
)
18131813
RETURNS TABLE(
1814-
key varchar,
1815-
attrnum int4,
1816-
category varchar,
1817-
tuple_id tid,
1818-
add_info_is_null bool,
1819-
add_info varchar,
1820-
is_postring_tree bool,
1814+
key varchar,
1815+
attrnum int4,
1816+
category varchar,
1817+
tuple_id tid,
1818+
add_info_is_null bool,
1819+
add_info varchar,
1820+
is_postring_tree bool,
18211821
postring_tree_root int4
1822-
)
1822+
)
18231823
AS $$
18241824
SELECT *
18251825
FROM rum_page_items_info(rel_name, blk_num, 2)
@@ -1836,21 +1836,21 @@ AS $$
18361836
$$ LANGUAGE sql;
18371837

18381838
CREATE FUNCTION rum_internal_entry_page_items(
1839-
rel_name text,
1839+
rel_name text,
18401840
blk_num int4
18411841
)
18421842
RETURNS TABLE(
1843-
key varchar,
1844-
attrnum int4,
1845-
category varchar,
1846-
down_link int4)
1843+
key varchar,
1844+
attrnum int4,
1845+
category varchar,
1846+
down_link int4)
18471847
AS $$
18481848
SELECT *
18491849
FROM rum_page_items_info(rel_name, blk_num, 3)
18501850
AS rum_page_items_info(
1851-
key varchar,
1852-
attrnum int4,
1853-
category varchar,
1851+
key varchar,
1852+
attrnum int4,
1853+
category varchar,
18541854
down_link int4
18551855
);
18561856
$$ LANGUAGE sql;

sql/rum_debug_funcs.sql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ CREATE TABLE test_debug_table (id int, t tsvector, d timestamp);
1010
DO $$
1111
BEGIN
1212
FOR i IN 1..5000 LOOP
13-
INSERT INTO test_debug_table(id, t, d)
13+
INSERT INTO test_debug_table(id, t, d)
1414
VALUES(i, 'b9', '2016-05-02 00:21:22.326724');
1515
END LOOP;
1616
END;
@@ -35,8 +35,8 @@ SELECT * FROM rum_page_opaque_info('test_without_addinfo_idx', 9);
3535
SELECT * FROM rum_leaf_data_page_items('test_without_addinfo_idx', 9);
3636

3737
-- Testing on the index with additional information (order_by_attach = false)
38-
CREATE INDEX test_with_addinfo_idx_false ON test_debug_table
39-
USING rum (t rum_tsvector_addon_ops, d)
38+
CREATE INDEX test_with_addinfo_idx_false ON test_debug_table
39+
USING rum (t rum_tsvector_addon_ops, d)
4040
WITH (attach = 'd', to = 't', order_by_attach='f');
4141

4242
SELECT * FROM rum_metapage_info('test_with_addinfo_idx_false', 0) \gx
@@ -65,8 +65,8 @@ SELECT * FROM rum_page_opaque_info('test_with_addinfo_idx_false', 27);
6565
SELECT * FROM rum_leaf_data_page_items('test_with_addinfo_idx_false', 27);
6666

6767
-- Testing on 32-bit and 64-bit on the index with additional information (order_by_attach = true)
68-
CREATE INDEX test_with_addinfo_idx_true ON test_debug_table
69-
USING rum (t rum_tsvector_addon_ops, id)
68+
CREATE INDEX test_with_addinfo_idx_true ON test_debug_table
69+
USING rum (t rum_tsvector_addon_ops, id)
7070
WITH (attach = 'id', to = 't', order_by_attach='t');
7171

7272
SELECT * FROM rum_metapage_info('test_with_addinfo_idx_true', 0) \gx
@@ -110,13 +110,13 @@ FOR EACH ROW EXECUTE PROCEDURE fill_test_debug_weight_trigger();
110110
DO $$
111111
BEGIN
112112
FOR i IN 1..5000 LOOP
113-
INSERT INTO test_debug_table_with_weight(t,r)
113+
INSERT INTO test_debug_table_with_weight(t,r)
114114
VALUES('As a reward for your reformation I write to you on this precious sheet.', 'write');
115115
END LOOP;
116116
END;
117117
$$;
118118

119-
CREATE INDEX test_with_weight_idx ON test_debug_table_with_weight
119+
CREATE INDEX test_with_weight_idx ON test_debug_table_with_weight
120120
USING rum (a rum_tsvector_ops);
121121

122122
SELECT * FROM rum_metapage_info('test_with_weight_idx', 0) \gx

0 commit comments

Comments
 (0)