File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -34,19 +34,16 @@ SELECT * FROM test_table WHERE test_attr1 = 15;
34
34
35
35
UPDATE sr_plans SET enable = true;
36
36
SELECT * FROM test_table WHERE test_attr1 = _p(10);
37
- WARNING: Ok we find saved plan.
38
37
test_attr1 | test_attr2
39
38
------------+------------
40
39
(0 rows)
41
40
42
41
SELECT * FROM test_table WHERE test_attr1 = _p(15);
43
- WARNING: Ok we find saved plan.
44
42
test_attr1 | test_attr2
45
43
------------+------------
46
44
(0 rows)
47
45
48
46
SELECT * FROM test_table WHERE test_attr1 = 10;
49
- WARNING: Ok we find saved plan.
50
47
test_attr1 | test_attr2
51
48
------------+------------
52
49
(0 rows)
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ CREATE TABLE sr_plans (
14
14
15
15
CREATE INDEX sr_plans_query_hash_idx ON sr_plans (query_hash);
16
16
-- CREATE INDEX sr_plans_plan_hash_idx ON sr_plans (plan_hashs);
17
- -- create function _p(anyelement) returns anyelement as $$ select $1; $$ language sql VOLATILE;
18
17
19
18
CREATE FUNCTION _p (anyelement)
20
19
RETURNS anyelement
@@ -32,4 +31,4 @@ CREATE FUNCTION sr_plan_invalid_table() RETURNS event_trigger
32
31
33
32
CREATE EVENT TRIGGER sr_plan_invalid_table ON sql_drop
34
33
-- WHEN TAG IN ('DROP TABLE')
35
- EXECUTE PROCEDURE sr_plan_invalid_table();
34
+ EXECUTE PROCEDURE sr_plan_invalid_table();
Original file line number Diff line number Diff line change @@ -210,8 +210,7 @@ PlannedStmt *sr_planner(Query *parse,
210
210
HeapTuple local_tuple ;
211
211
local_tuple = index_getnext (query_index_scan , ForwardScanDirection );
212
212
213
- if (local_tuple == NULL )
214
- break ;
213
+ if (local_tuple == NULL ) break ;
215
214
216
215
heap_deform_tuple (local_tuple , sr_plans_heap -> rd_att ,
217
216
search_values , search_nulls );
@@ -227,7 +226,7 @@ PlannedStmt *sr_planner(Query *parse,
227
226
228
227
if (find_ok )
229
228
{
230
- elog (WARNING , "Ok we find saved plan." );
229
+ /* elog(WARNING, "Ok we find saved plan."); */
231
230
out_jsonb2 = (Jsonb * )DatumGetPointer (PG_DETOAST_DATUM (search_values [3 ]));
232
231
if (query_params != NULL )
233
232
pl_stmt = jsonb_to_node_tree (out_jsonb2 , & replace_fake );
You can’t perform that action at this time.
0 commit comments