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

Commitefbdef4

Browse files
author
Daniil Anisimov
committed
Change aqo.querytext_max_size lower limit to 1.
1 parentcfc3bac commitefbdef4

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
@@ -262,7 +262,7 @@ _PG_init(void)
262262
NULL,
263263
&querytext_max_size,
264264
1000,
265-
0,INT_MAX,
265+
1,INT_MAX,
266266
PGC_SUSET,
267267
0,
268268
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