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

Commitfc7e5ff

Browse files
author
Daniil Anisimov
committed
Change aqo.querytext_max_size lower limit to 1.
1 parent240ba05 commitfc7e5ff

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

‎aqo.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ _PG_init(void)
256256
NULL,
257257
&querytext_max_size,
258258
1000,
259-
0,INT_MAX,
259+
1,INT_MAX,
260260
PGC_SUSET,
261261
0,
262262
NULL,

‎expected/update_functions.out‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,33 @@ SELECT aqo_data_update(1, 1, 1, '{{1}, {2}}', '{1}', '{1}', '{1, 2, 3}');
417417
(1 row)
418418

419419
SET aqo.mode='disabled';
420+
-- Testing the minimum querytext size
421+
SELECT true AS success FROM aqo_reset();
422+
success
423+
---------
424+
t
425+
(1 row)
426+
427+
SET aqo.querytext_max_size = 0;
428+
ERROR: 0 is outside the valid range for parameter "aqo.querytext_max_size" (1 .. 2147483647)
429+
SET aqo.querytext_max_size = 1;
430+
SELECT queryid, query_text FROM aqo_query_texts WHERE queryid > 0;
431+
queryid | query_text
432+
---------+------------
433+
(0 rows)
434+
435+
SELECT aqo_query_texts_update(1, 'test');
436+
aqo_query_texts_update
437+
------------------------
438+
t
439+
(1 row)
440+
441+
SELECT queryid, query_text FROM aqo_query_texts WHERE queryid > 0;
442+
queryid | query_text
443+
---------+------------
444+
1 |
445+
(1 row)
446+
420447
DROP EXTENSION aqo CASCADE;
421448
DROP TABLE aqo_test1, aqo_test2;
422449
DROP TABLE aqo_query_texts_dump, aqo_queries_dump, aqo_query_stat_dump, aqo_data_dump;

‎sql/update_functions.sql‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,14 @@ SELECT aqo_data_update(1, 1, 1, '{{1}, {2}}', '{1}', '{1}', '{1, 2, 3}');
204204

205205
SETaqo.mode='disabled';
206206

207+
-- Testing the minimum querytext size
208+
SELECT trueAS successFROM aqo_reset();
209+
SETaqo.querytext_max_size=0;
210+
SETaqo.querytext_max_size=1;
211+
SELECT queryid, query_textFROM aqo_query_textsWHERE queryid>0;
212+
SELECT aqo_query_texts_update(1,'test');
213+
SELECT queryid, query_textFROM aqo_query_textsWHERE queryid>0;
214+
207215
DROP EXTENSION aqo CASCADE;
208216

209217
DROPTABLE aqo_test1, aqo_test2;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp