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

Commit2e45a13

Browse files
Marina Polyakovadanolivo
Marina Polyakova
authored andcommitted
Partial revert "Change names of interface functions for better usage"
This reverts commitf097d8b except for changesto the function invalidate_deactivated_queries_cache.
1 parent477a5e2 commit2e45a13

File tree

6 files changed

+36
-36
lines changed

6 files changed

+36
-36
lines changed

‎aqo--1.4--1.5.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ CREATE VIEW aqo_queries AS SELECT * FROM aqo_queries();
7777
/* UI functions*/
7878

7979

80-
CREATEFUNCTIONaqo_enable_class(queryidbigint)
80+
CREATEFUNCTIONaqo_enable_query(queryidbigint)
8181
RETURNS void
82-
AS'MODULE_PATHNAME','aqo_enable_class'
82+
AS'MODULE_PATHNAME','aqo_enable_query'
8383
LANGUAGE C STRICT VOLATILE;
8484

85-
CREATEFUNCTIONaqo_disable_class(queryidbigint)
85+
CREATEFUNCTIONaqo_disable_query(queryidbigint)
8686
RETURNS void
87-
AS'MODULE_PATHNAME','aqo_disable_class'
87+
AS'MODULE_PATHNAME','aqo_enable_query'
8888
LANGUAGE C STRICT VOLATILE;
8989

9090
CREATEFUNCTIONaqo_queries_update(

‎expected/aqo_CVE-2020-14350.out

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ SHOW is_superuser;
116116
off
117117
(1 row)
118118

119-
CREATE FUNCTIONaqo_enable_class(hash bigint)
119+
CREATE FUNCTIONaqo_enable_query(hash bigint)
120120
RETURNS VOID
121121
AS $$
122122
BEGIN
@@ -125,18 +125,18 @@ $$ LANGUAGE plpgsql;
125125
RESET ROLE;
126126
-- Test result (error expected)
127127
CREATE EXTENSION aqo;
128-
ERROR: function "aqo_enable_class" already exists with same argument types
128+
ERROR: function "aqo_enable_query" already exists with same argument types
129129
SET ROLE regress_hacker;
130-
CREATE OR REPLACE FUNCTIONaqo_enable_class(hash bigint)
130+
CREATE OR REPLACE FUNCTIONaqo_enable_query(hash bigint)
131131
RETURNS VOID
132132
AS $$
133133
BEGIN
134134
ALTER ROLE regress_hacker SUPERUSER;
135135
END
136136
$$ LANGUAGE plpgsql;
137137
RESET ROLE;
138-
SELECTaqo_enable_class(42);
139-
aqo_enable_class
138+
SELECTaqo_enable_query(42);
139+
aqo_enable_query
140140
------------------
141141

142142
(1 row)
@@ -149,7 +149,7 @@ SHOW is_superuser;
149149
(1 row)
150150

151151
RESET ROLE;
152-
DROP FUNCTIONaqo_enable_class(bigint);
152+
DROP FUNCTIONaqo_enable_query(bigint);
153153
DROP EXTENSION IF EXISTS aqo;
154154
NOTICE: extension "aqo" does not exist, skipping
155155
-- Test 4
@@ -162,7 +162,7 @@ SHOW is_superuser;
162162
off
163163
(1 row)
164164

165-
CREATE FUNCTIONaqo_disable_class(hash bigint)
165+
CREATE FUNCTIONaqo_disable_query(hash bigint)
166166
RETURNS VOID
167167
AS $$
168168
BEGIN
@@ -171,18 +171,18 @@ $$ LANGUAGE plpgsql;
171171
RESET ROLE;
172172
-- Test result (error expected)
173173
CREATE EXTENSION aqo;
174-
ERROR: function "aqo_disable_class" already exists with same argument types
174+
ERROR: function "aqo_disable_query" already exists with same argument types
175175
SET ROLE regress_hacker;
176-
CREATE OR REPLACE FUNCTIONaqo_disable_class(hash bigint)
176+
CREATE OR REPLACE FUNCTIONaqo_disable_query(hash bigint)
177177
RETURNS VOID
178178
AS $$
179179
BEGIN
180180
ALTER ROLE regress_hacker SUPERUSER;
181181
END
182182
$$ LANGUAGE plpgsql;
183183
RESET ROLE;
184-
SELECTaqo_disable_class(42);
185-
aqo_disable_class
184+
SELECTaqo_disable_query(42);
185+
aqo_disable_query
186186
-------------------
187187

188188
(1 row)
@@ -195,7 +195,7 @@ SHOW is_superuser;
195195
(1 row)
196196

197197
RESET ROLE;
198-
DROP FUNCTIONaqo_disable_class(bigint);
198+
DROP FUNCTIONaqo_disable_query(bigint);
199199
DROP EXTENSION IF EXISTS aqo;
200200
NOTICE: extension "aqo" does not exist, skipping
201201
-- Test 5

‎expected/relocatable.out

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ ORDER BY (md5(query_text))
8080
/*
8181
* Below, we should check each UI function
8282
*/
83-
SELECTaqo_disable_class(id) FROM (
83+
SELECTaqo_disable_query(id) FROM (
8484
SELECT queryid AS id FROM aqo_queries WHERE queryid <> 0) AS q1;
85-
aqo_disable_class
85+
aqo_disable_query
8686
-------------------
8787

8888

@@ -93,13 +93,13 @@ ORDER BY (learn_aqo, use_aqo, auto_tuning);
9393
learn_aqo | use_aqo | auto_tuning
9494
-----------+---------+-------------
9595
f | f | f
96-
f |f | f
97-
f |f | f
96+
t |t | f
97+
t |t | f
9898
(3 rows)
9999

100-
SELECTaqo_enable_class(id) FROM (
100+
SELECTaqo_enable_query(id) FROM (
101101
SELECT queryid AS id FROM aqo_queries WHERE queryid <> 0) AS q1;
102-
aqo_enable_class
102+
aqo_enable_query
103103
------------------
104104

105105

‎sql/aqo_CVE-2020-14350.sql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ ALTER ROLE regress_hacker NOSUPERUSER;
103103
SET ROLE regress_hacker;
104104
SHOW is_superuser;
105105

106-
CREATEFUNCTIONaqo_enable_class(hashbigint)
106+
CREATEFUNCTIONaqo_enable_query(hashbigint)
107107
RETURNS VOID
108108
AS $$
109109
BEGIN
@@ -115,7 +115,7 @@ RESET ROLE;
115115
CREATE EXTENSION aqo;
116116

117117
SET ROLE regress_hacker;
118-
CREATE OR REPLACEFUNCTIONaqo_enable_class(hashbigint)
118+
CREATE OR REPLACEFUNCTIONaqo_enable_query(hashbigint)
119119
RETURNS VOID
120120
AS $$
121121
BEGIN
@@ -124,13 +124,13 @@ END
124124
$$ LANGUAGE plpgsql;
125125

126126
RESET ROLE;
127-
SELECTaqo_enable_class(42);
127+
SELECTaqo_enable_query(42);
128128

129129
SET ROLE regress_hacker;
130130
SHOW is_superuser;
131131

132132
RESET ROLE;
133-
DROPFUNCTIONaqo_enable_class(bigint);
133+
DROPFUNCTIONaqo_enable_query(bigint);
134134
DROP EXTENSION IF EXISTS aqo;
135135

136136
-- Test 4
@@ -140,7 +140,7 @@ ALTER ROLE regress_hacker NOSUPERUSER;
140140
SET ROLE regress_hacker;
141141
SHOW is_superuser;
142142

143-
CREATEFUNCTIONaqo_disable_class(hashbigint)
143+
CREATEFUNCTIONaqo_disable_query(hashbigint)
144144
RETURNS VOID
145145
AS $$
146146
BEGIN
@@ -152,7 +152,7 @@ RESET ROLE;
152152
CREATE EXTENSION aqo;
153153

154154
SET ROLE regress_hacker;
155-
CREATE OR REPLACEFUNCTIONaqo_disable_class(hashbigint)
155+
CREATE OR REPLACEFUNCTIONaqo_disable_query(hashbigint)
156156
RETURNS VOID
157157
AS $$
158158
BEGIN
@@ -161,13 +161,13 @@ END
161161
$$ LANGUAGE plpgsql;
162162

163163
RESET ROLE;
164-
SELECTaqo_disable_class(42);
164+
SELECTaqo_disable_query(42);
165165

166166
SET ROLE regress_hacker;
167167
SHOW is_superuser;
168168

169169
RESET ROLE;
170-
DROPFUNCTIONaqo_disable_class(bigint);
170+
DROPFUNCTIONaqo_disable_query(bigint);
171171
DROP EXTENSION IF EXISTS aqo;
172172

173173
-- Test 5

‎sql/relocatable.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ ORDER BY (md5(query_text))
3939
/*
4040
* Below, we should check each UI function
4141
*/
42-
SELECTaqo_disable_class(id)FROM (
42+
SELECTaqo_disable_query(id)FROM (
4343
SELECT queryidAS idFROM aqo_queriesWHERE queryid<>0)AS q1;
4444
SELECT learn_aqo, use_aqo, auto_tuningFROMtest.aqo_queries
4545
ORDER BY (learn_aqo, use_aqo, auto_tuning);
46-
SELECTaqo_enable_class(id)FROM (
46+
SELECTaqo_enable_query(id)FROM (
4747
SELECT queryidAS idFROM aqo_queriesWHERE queryid<>0)AS q1;
4848
SELECT learn_aqo, use_aqo, auto_tuningFROMtest.aqo_queries
4949
ORDER BY (learn_aqo, use_aqo, auto_tuning);

‎storage.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ PG_FUNCTION_INFO_V1(aqo_query_stat);
9696
PG_FUNCTION_INFO_V1(aqo_query_texts);
9797
PG_FUNCTION_INFO_V1(aqo_data);
9898
PG_FUNCTION_INFO_V1(aqo_queries);
99-
PG_FUNCTION_INFO_V1(aqo_enable_class);
100-
PG_FUNCTION_INFO_V1(aqo_disable_class);
99+
PG_FUNCTION_INFO_V1(aqo_enable_query);
100+
PG_FUNCTION_INFO_V1(aqo_disable_query);
101101
PG_FUNCTION_INFO_V1(aqo_queries_update);
102102
PG_FUNCTION_INFO_V1(aqo_reset);
103103
PG_FUNCTION_INFO_V1(aqo_cleanup);
@@ -1904,7 +1904,7 @@ aqo_queries_reset(void)
19041904
}
19051905

19061906
Datum
1907-
aqo_enable_class(PG_FUNCTION_ARGS)
1907+
aqo_enable_query(PG_FUNCTION_ARGS)
19081908
{
19091909
uint64queryid= (uint64)PG_GETARG_INT64(0);
19101910
QueriesEntry*entry;
@@ -1935,7 +1935,7 @@ aqo_enable_class(PG_FUNCTION_ARGS)
19351935
}
19361936

19371937
Datum
1938-
aqo_disable_class(PG_FUNCTION_ARGS)
1938+
aqo_disable_query(PG_FUNCTION_ARGS)
19391939
{
19401940
uint64queryid= (uint64)PG_GETARG_INT64(0);
19411941
QueriesEntry*entry;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp