forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit83a1a1b
committed
Generate pg_stat_get*() functions for tables using macros
The same code pattern is repeated 17 times for int64 counters (0 formissing entry) and 5 times for timestamps (NULL for missing entry) ontable entries. This code is switched to use a macro for the basic codeinstead, shaving a few hundred lines of originally-duplicated code. Thefunction names remain the same, but some fields of PgStat_StatTabEntryhave to be renamed to cope with the new style.Author: Bertrand DrouvotReviewed-by: Nathan BossartDiscussion: https:/postgr.es/m/20221204173207.GA2669116@nathanxps131 parent941aa6a commit83a1a1b
File tree
5 files changed
+139
-396
lines changed- src
- backend
- access/heap
- postmaster
- utils
- activity
- adt
- include
5 files changed
+139
-396
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
271 | 271 |
| |
272 | 272 |
| |
273 | 273 |
| |
274 |
| - | |
| 274 | + | |
275 | 275 |
| |
276 | 276 |
| |
277 | 277 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3081 | 3081 |
| |
3082 | 3082 |
| |
3083 | 3083 |
| |
3084 |
| - | |
3085 |
| - | |
3086 |
| - | |
| 3084 | + | |
| 3085 | + | |
| 3086 | + | |
3087 | 3087 |
| |
3088 | 3088 |
| |
3089 | 3089 |
| |
|
Lines changed: 25 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
231 | 231 |
| |
232 | 232 |
| |
233 | 233 |
| |
234 |
| - | |
235 |
| - | |
| 234 | + | |
| 235 | + | |
236 | 236 |
| |
237 | 237 |
| |
238 | 238 |
| |
| |||
244 | 244 |
| |
245 | 245 |
| |
246 | 246 |
| |
247 |
| - | |
| 247 | + | |
248 | 248 |
| |
249 | 249 |
| |
250 | 250 |
| |
251 |
| - | |
252 |
| - | |
| 251 | + | |
| 252 | + | |
253 | 253 |
| |
254 | 254 |
| |
255 | 255 |
| |
256 |
| - | |
| 256 | + | |
257 | 257 |
| |
258 | 258 |
| |
259 | 259 |
| |
| |||
264 | 264 |
| |
265 | 265 |
| |
266 | 266 |
| |
267 |
| - | |
| 267 | + | |
268 | 268 |
| |
269 | 269 |
| |
270 | 270 |
| |
| |||
318 | 318 |
| |
319 | 319 |
| |
320 | 320 |
| |
321 |
| - | |
322 |
| - | |
| 321 | + | |
| 322 | + | |
323 | 323 |
| |
324 | 324 |
| |
325 |
| - | |
| 325 | + | |
326 | 326 |
| |
327 | 327 |
| |
328 | 328 |
| |
329 | 329 |
| |
330 |
| - | |
| 330 | + | |
331 | 331 |
| |
332 | 332 |
| |
333 | 333 |
| |
334 |
| - | |
335 |
| - | |
| 334 | + | |
| 335 | + | |
336 | 336 |
| |
337 | 337 |
| |
338 | 338 |
| |
339 |
| - | |
| 339 | + | |
340 | 340 |
| |
341 | 341 |
| |
342 | 342 |
| |
| |||
798 | 798 |
| |
799 | 799 |
| |
800 | 800 |
| |
801 |
| - | |
802 |
| - | |
803 |
| - | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
804 | 804 |
| |
805 | 805 |
| |
806 |
| - | |
807 |
| - | |
808 |
| - | |
809 |
| - | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
810 | 810 |
| |
811 | 811 |
| |
812 | 812 |
| |
813 |
| - | |
814 |
| - | |
815 |
| - | |
816 |
| - | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
817 | 817 |
| |
818 | 818 |
| |
819 | 819 |
| |
|
0 commit comments
Comments
(0)