- Notifications
You must be signed in to change notification settings - Fork5
Commit29bf501
committed
Add a direct function call mechanism using the caller's context.
The current DirectFunctionCall functions use NULL as the flinfo ininitializing the FunctionCallInfoData for the call. That means thecalled function has no fn_mcxt or fn_extra to work with, and attemptingto do so will result in an access violation. These functions instead usethe provided flinfo, which will usually be the caller's own flinfo. Thecaller needs to ensure that it doesn't use the fn_extra in way that isincompatible with the way the called function will use it. The calledfunction should not rely on anything else in the provided context, as itwill be relevant to the caller, not the callee.Original code from Tom Lane.Discussion:https://postgr.es/m/db2b70a4-78d7-294a-a315-8e7f506c5978@2ndQuadrant.com1 parent0105055 commit29bf501
2 files changed
+63
-0
lines changedLines changed: 50 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1276 | 1276 |
| |
1277 | 1277 |
| |
1278 | 1278 |
| |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
1279 | 1329 |
| |
1280 | 1330 |
| |
1281 | 1331 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
483 | 483 |
| |
484 | 484 |
| |
485 | 485 |
| |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
486 | 499 |
| |
487 | 500 |
| |
488 | 501 |
| |
|
0 commit comments
Comments
(0)