- Notifications
You must be signed in to change notification settings - Fork5
Commita40fa61
committed
Add some infrastructure for contrib/pg_stat_statements.
Add a queryId field to Query and PlannedStmt. This is not used by thecore backend, except for being copied around at appropriate times.It's meant to allow plug-ins to track a particular query forward fromparse analysis to execution.The queryId is intentionally not dumped into stored rules (and hence thiscommit doesn't bump catversion). You could argue that choice either way,but it seems better that stored rule strings not have any dependencyon plug-ins that might or might not be present.Also, add a post_parse_analyze_hook that gets invoked at the end ofparse analysis (but only for top-level analysis of complete queries,not cases such as analyzing a domain's default-value expression).This is mainly meant to be used to compute and assign a queryId,but it could have other applications.Peter Geoghegan1 parent40b9b95 commita40fa61
File tree
11 files changed
+34
-0
lines changed- src
- backend
- nodes
- optimizer/plan
- parser
- rewrite
- tcop
- include
- nodes
- parser
11 files changed
+34
-0
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
| 81 | + | |
81 | 82 |
| |
82 | 83 |
| |
83 | 84 |
| |
| |||
2402 | 2403 |
| |
2403 | 2404 |
| |
2404 | 2405 |
| |
| 2406 | + | |
2405 | 2407 |
| |
2406 | 2408 |
| |
2407 | 2409 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
897 | 897 |
| |
898 | 898 |
| |
899 | 899 |
| |
| 900 | + | |
900 | 901 |
| |
901 | 902 |
| |
902 | 903 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
242 | 242 |
| |
243 | 243 |
| |
244 | 244 |
| |
| 245 | + | |
245 | 246 |
| |
246 | 247 |
| |
247 | 248 |
| |
| |||
2152 | 2153 |
| |
2153 | 2154 |
| |
2154 | 2155 |
| |
| 2156 | + | |
2155 | 2157 |
| |
2156 | 2158 |
| |
2157 | 2159 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
195 | 195 |
| |
196 | 196 |
| |
197 | 197 |
| |
| 198 | + | |
198 | 199 |
| |
199 | 200 |
| |
200 | 201 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
225 | 225 |
| |
226 | 226 |
| |
227 | 227 |
| |
| 228 | + | |
228 | 229 |
| |
229 | 230 |
| |
230 | 231 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 |
| |
48 | 51 |
| |
49 | 52 |
| |
| |||
95 | 98 |
| |
96 | 99 |
| |
97 | 100 |
| |
| 101 | + | |
| 102 | + | |
| 103 | + | |
98 | 104 |
| |
99 | 105 |
| |
100 | 106 |
| |
| |||
125 | 131 |
| |
126 | 132 |
| |
127 | 133 |
| |
| 134 | + | |
| 135 | + | |
| 136 | + | |
128 | 137 |
| |
129 | 138 |
| |
130 | 139 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2157 | 2157 |
| |
2158 | 2158 |
| |
2159 | 2159 |
| |
| 2160 | + | |
2160 | 2161 |
| |
2161 | 2162 |
| |
2162 | 2163 |
| |
| |||
2181 | 2182 |
| |
2182 | 2183 |
| |
2183 | 2184 |
| |
| 2185 | + | |
| 2186 | + | |
2184 | 2187 |
| |
2185 | 2188 |
| |
2186 | 2189 |
| |
2187 | 2190 |
| |
2188 | 2191 |
| |
2189 | 2192 |
| |
2190 | 2193 |
| |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
2191 | 2197 |
| |
2192 | 2198 |
| |
2193 | 2199 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
626 | 626 |
| |
627 | 627 |
| |
628 | 628 |
| |
| 629 | + | |
| 630 | + | |
| 631 | + | |
629 | 632 |
| |
630 | 633 |
| |
631 | 634 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
103 | 103 |
| |
104 | 104 |
| |
105 | 105 |
| |
| 106 | + | |
| 107 | + | |
106 | 108 |
| |
107 | 109 |
| |
108 | 110 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
| 40 | + | |
| 41 | + | |
40 | 42 |
| |
41 | 43 |
| |
42 | 44 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 |
| |
20 | 25 |
| |
21 | 26 |
| |
|
0 commit comments
Comments
(0)