File tree Expand file tree Collapse file tree 5 files changed +114
-90
lines changed Expand file tree Collapse file tree 5 files changed +114
-90
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,16 @@ endif
17
17
PGXS := $(shell $(PG_CONFIG ) --pgxs)
18
18
include $(PGXS )
19
19
20
- gen_parser :
20
+ serialize.c deserialize.c : gen_parser.py nodes.h
21
21
python gen_parser.py nodes.h ` $( PG_CONFIG) --includedir-server`
22
22
else
23
23
subdir = contrib/sr_plan
24
24
top_builddir = ../..
25
25
include $(top_builddir ) /src/Makefile.global
26
26
include $(top_srcdir ) /contrib/contrib-global.mk
27
27
28
- gen_parser :
28
+ serialize.c deserialize.c : gen_parser.py nodes.h
29
29
python gen_parser.py nodes.h ' $(top_srcdir)/src/include'
30
30
endif
31
+
32
+ all : serialize.c
Original file line number Diff line number Diff line change @@ -53,11 +53,21 @@ SELECT * FROM test_table WHERE test_attr1 = 15;
53
53
------------+------------
54
54
(0 rows)
55
55
56
+ SELECT enable, valid, query FROM sr_plans;
57
+ enable | valid | query
58
+ --------+-------+-----------------------------------------------------
59
+ t | t | SELECT * FROM test_table WHERE test_attr1 = _p(10);
60
+ t | t | SELECT * FROM test_table WHERE test_attr1 = 10;
61
+ (2 rows)
62
+
56
63
DROP TABLE test_table;
57
- WARNING: Invalidate saved plan with query:
58
- SELECT * FROM test_table WHERE test_attr1 = _p(10);
59
- WARNING: Invalidate saved plan with query:
60
- SELECT * FROM test_table WHERE test_attr1 = 10;
64
+ SELECT enable, valid, query FROM sr_plans;
65
+ enable | valid | query
66
+ --------+-------+-----------------------------------------------------
67
+ f | f | SELECT * FROM test_table WHERE test_attr1 = _p(10);
68
+ f | f | SELECT * FROM test_table WHERE test_attr1 = 10;
69
+ (2 rows)
70
+
61
71
CREATE TABLE test_table(test_attr1 int, test_attr2 int);
62
72
SELECT * FROM test_table WHERE test_attr1 = _p(10);
63
73
test_attr1 | test_attr2
Original file line number Diff line number Diff line change 1
1
#define __attribute__ (x )
2
2
#include "pg_config.h"
3
-
4
- #if PG_VERSION_NUM < 110000
5
3
typedef int __int128
6
- #endif
7
4
8
5
#include "postgres.h"
9
6
#include "nodes/plannodes.h"
Original file line number Diff line number Diff line change @@ -18,7 +18,10 @@ SELECT * FROM test_table WHERE test_attr1 = _p(15);
18
18
SELECT * FROM test_table WHERE test_attr1 = 10 ;
19
19
SELECT * FROM test_table WHERE test_attr1 = 15 ;
20
20
21
+ SELECT enable, valid, query FROM sr_plans;
21
22
DROP TABLE test_table;
23
+ SELECT enable, valid, query FROM sr_plans;
24
+
22
25
CREATE TABLE test_table (test_attr1 int , test_attr2 int );
23
26
24
27
SELECT * FROM test_table WHERE test_attr1 = _p(10 );
You can’t perform that action at this time.
0 commit comments