Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 36e72de

Browse files
author
Vladimir Ershov
committed
fix tests
1 parent 0d17974 commit 36e72de

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

expected/sr_plan.out

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
CREATE EXTENSION sr_plan;
2+
set client_min_messages = LOG;
23
CREATE TABLE test_table(test_attr1 int, test_attr2 int);
34
SET sr_plan.write_mode = true;
45
SELECT * FROM test_table WHERE test_attr1 = _p(10);
@@ -34,16 +35,19 @@ SELECT * FROM test_table WHERE test_attr1 = 15;
3435

3536
UPDATE sr_plans SET enable = true;
3637
SELECT * FROM test_table WHERE test_attr1 = _p(10);
38+
LOG: Ok we find saved plan.
3739
test_attr1 | test_attr2
3840
------------+------------
3941
(0 rows)
4042

4143
SELECT * FROM test_table WHERE test_attr1 = _p(15);
44+
LOG: Ok we find saved plan.
4245
test_attr1 | test_attr2
4346
------------+------------
4447
(0 rows)
4548

4649
SELECT * FROM test_table WHERE test_attr1 = 10;
50+
LOG: Ok we find saved plan.
4751
test_attr1 | test_attr2
4852
------------+------------
4953
(0 rows)

sql/sr_plan.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
CREATE EXTENSION sr_plan;
2+
set client_min_messages = LOG;
23

34
CREATE TABLE test_table(test_attr1 int, test_attr2 int);
45
SET sr_plan.write_mode = true;
@@ -24,4 +25,4 @@ CREATE TABLE test_table(test_attr1 int, test_attr2 int);
2425
SELECT * FROM test_table WHERE test_attr1 = _p(10);
2526
SELECT * FROM test_table WHERE test_attr1 = 10;
2627
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;

sr_plan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ PlannedStmt *sr_planner(Query *parse,
226226

227227
if (find_ok)
228228
{
229-
/* elog(WARNING, "Ok we find saved plan."); */
229+
elog(LOG, "Ok we find saved plan.");
230230
out_jsonb2 = (Jsonb *)DatumGetPointer(PG_DETOAST_DATUM(search_values[3]));
231231
if (query_params != NULL)
232232
pl_stmt = jsonb_to_node_tree(out_jsonb2, &replace_fake);

0 commit comments

Comments
 (0)