forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita04ddd0
committed
Improve support for ExplainOneQuery() hook
There is a hook called ExplainOneQuery_hook that gives modules thepossibility to plug into this code path, but, like utility.c for utilitystatement execution, there is no corresponding "standard" routine inthe case of EXPLAIN executed for one Query.This commit adds a new standard_ExplainOneQuery() in explain.c, which isable to run explain on a non-utility Query without calling its hook.Per the feedback received from a couple of hackers, this change givesthe possibility to cut a few hundred lines of code in some of thepopular out-of-core modules as these maintained a copy ofExplainOneQuery(), adding custom extra information at the beginning orthe end of the EXPLAIN output.Author: Mats KindahlReviewed-by: Aleksander Alekseev, Jelte Fennema-Nio, Andrei LepikhovDiscussion:https://postgr.es/m/CA+14427V_B4EAoC_o-iYYucRdMSOTfpuH9k-QbexffY1HYJBiA@mail.gmail.com1 parentc399248 commita04ddd0
2 files changed
+63
-47
lines changedLines changed: 59 additions & 47 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
394 | 394 |
| |
395 | 395 |
| |
396 | 396 |
| |
397 |
| - | |
398 |
| - | |
399 |
| - | |
400 |
| - | |
401 |
| - | |
402 |
| - | |
403 |
| - | |
404 |
| - | |
405 |
| - | |
406 |
| - | |
407 |
| - | |
408 |
| - | |
409 |
| - | |
410 |
| - | |
411 |
| - | |
412 |
| - | |
413 |
| - | |
414 |
| - | |
415 |
| - | |
416 |
| - | |
417 |
| - | |
418 |
| - | |
419 |
| - | |
420 |
| - | |
421 |
| - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
422 | 400 |
| |
423 |
| - | |
424 |
| - | |
425 |
| - | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
426 | 435 |
| |
427 |
| - | |
428 |
| - | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
429 | 439 |
| |
430 |
| - | |
431 |
| - | |
| 440 | + | |
| 441 | + | |
432 | 442 |
| |
433 |
| - | |
434 |
| - | |
435 |
| - | |
436 |
| - | |
437 |
| - | |
| 443 | + | |
| 444 | + | |
438 | 445 |
| |
439 |
| - | |
440 |
| - | |
441 |
| - | |
442 |
| - | |
443 |
| - | |
444 |
| - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
445 | 451 |
| |
446 |
| - | |
447 |
| - | |
448 |
| - | |
449 |
| - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
450 | 457 |
| |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
451 | 463 |
| |
452 | 464 |
| |
453 | 465 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
80 | 80 |
| |
81 | 81 |
| |
82 | 82 |
| |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
83 | 87 |
| |
84 | 88 |
| |
85 | 89 |
| |
|
0 commit comments
Comments
(0)