Commit f8bf567
Provide a post-rewrite callback hook in plancache.c.
SQL-language functions sometimes want to modify the targetlist of
the query that returns their result. If they're to use the plan
cache, it needs to be possible to do that over again when a
replan occurs. Invent a callback hook to make that happen.
I chose to provide a separate function SetPostRewriteHook to
install such hooks. An alternative API could be to add two
more arguments to CompleteCachedPlan. I didn't do so because
I felt that few callers will want this, but there's a case that
that way would be cleaner.
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/8216639.NyiUUSuA9g@aivenlaptop1 parent c43855e commit f8bf567
File tree
3 files changed
+42
-0
lines changed- src
- backend/utils/cache
- include/utils
- tools/pgindent
3 files changed
+42
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
| |||
316 | 318 | | |
317 | 319 | | |
318 | 320 | | |
| 321 | + | |
| 322 | + | |
319 | 323 | | |
320 | 324 | | |
321 | 325 | | |
| |||
485 | 489 | | |
486 | 490 | | |
487 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
488 | 515 | | |
489 | 516 | | |
490 | 517 | | |
| |||
813 | 840 | | |
814 | 841 | | |
815 | 842 | | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
816 | 847 | | |
817 | 848 | | |
818 | 849 | | |
| |||
1800 | 1831 | | |
1801 | 1832 | | |
1802 | 1833 | | |
| 1834 | + | |
| 1835 | + | |
1803 | 1836 | | |
1804 | 1837 | | |
1805 | 1838 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
| 118 | + | |
| 119 | + | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
| |||
223 | 228 | | |
224 | 229 | | |
225 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
226 | 234 | | |
227 | 235 | | |
228 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2266 | 2266 | | |
2267 | 2267 | | |
2268 | 2268 | | |
| 2269 | + | |
2269 | 2270 | | |
2270 | 2271 | | |
2271 | 2272 | | |
| |||
0 commit comments