File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
CREATE EXTENSION sr_plan;
2
+ set client_min_messages = LOG;
2
3
CREATE TABLE test_table(test_attr1 int, test_attr2 int);
3
4
SET sr_plan.write_mode = true;
4
5
SELECT * FROM test_table WHERE test_attr1 = _p(10);
@@ -34,16 +35,19 @@ SELECT * FROM test_table WHERE test_attr1 = 15;
34
35
35
36
UPDATE sr_plans SET enable = true;
36
37
SELECT * FROM test_table WHERE test_attr1 = _p(10);
38
+ LOG: Ok we find saved plan.
37
39
test_attr1 | test_attr2
38
40
------------+------------
39
41
(0 rows)
40
42
41
43
SELECT * FROM test_table WHERE test_attr1 = _p(15);
44
+ LOG: Ok we find saved plan.
42
45
test_attr1 | test_attr2
43
46
------------+------------
44
47
(0 rows)
45
48
46
49
SELECT * FROM test_table WHERE test_attr1 = 10;
50
+ LOG: Ok we find saved plan.
47
51
test_attr1 | test_attr2
48
52
------------+------------
49
53
(0 rows)
Original file line number Diff line number Diff line change 1
1
CREATE EXTENSION sr_plan;
2
+ set client_min_messages = LOG;
2
3
3
4
CREATE TABLE test_table (test_attr1 int , test_attr2 int );
4
5
SET sr_plan .write_mode = true;
@@ -24,4 +25,4 @@ CREATE TABLE test_table(test_attr1 int, test_attr2 int);
24
25
SELECT * FROM test_table WHERE test_attr1 = _p(10 );
25
26
SELECT * FROM test_table WHERE test_attr1 = 10 ;
26
27
SELECT * FROM test_table WHERE test_attr1 = 10 ;
27
- SELECT * FROM test_table WHERE test_attr1 = 15 ;
28
+ SELECT * FROM test_table WHERE test_attr1 = 15 ;
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ PlannedStmt *sr_planner(Query *parse,
226
226
227
227
if (find_ok )
228
228
{
229
- /* elog(WARNING , "Ok we find saved plan."); */
229
+ elog (LOG , "Ok we find saved plan." );
230
230
out_jsonb2 = (Jsonb * )DatumGetPointer (PG_DETOAST_DATUM (search_values [3 ]));
231
231
if (query_params != NULL )
232
232
pl_stmt = jsonb_to_node_tree (out_jsonb2 , & replace_fake );
You can’t perform that action at this time.
0 commit comments