- Notifications
You must be signed in to change notification settings - Fork28
Commitb3617cd
committed
Move portal pinning from PL/pgSQL to SPI
PL/pgSQL "pins" internally generated (unnamed) portals so that user codecannot close them by guessing their names. This logic is also useful inother languages and really for any code. So move that logic into SPI.An unnamed portal obtained through SPI_cursor_open() and relatedfunctions is now automatically pinned, and SPI_cursor_close()automatically unpins a portal that is pinned.In the core distribution, this affects PL/Perl and PL/Python, preventingusers from manually closing cursors created by spi_query andplpy.cursor, respectively. (PL/Tcl does not currently offer any cursorfunctionality.)Reviewed-by: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>1 parentacc67ff commitb3617cd
2 files changed
+9
-8
lines changedLines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1175 | 1175 |
| |
1176 | 1176 |
| |
1177 | 1177 |
| |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
1178 | 1184 |
| |
1179 | 1185 |
| |
1180 | 1186 |
| |
| |||
1413 | 1419 |
| |
1414 | 1420 |
| |
1415 | 1421 |
| |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
1416 | 1425 |
| |
1417 | 1426 |
| |
1418 | 1427 |
| |
|
Lines changed: 0 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5257 | 5257 |
| |
5258 | 5258 |
| |
5259 | 5259 |
| |
5260 |
| - | |
5261 |
| - | |
5262 |
| - | |
5263 |
| - | |
5264 |
| - | |
5265 |
| - | |
5266 | 5260 |
| |
5267 | 5261 |
| |
5268 | 5262 |
| |
| |||
5324 | 5318 |
| |
5325 | 5319 |
| |
5326 | 5320 |
| |
5327 |
| - | |
5328 |
| - | |
5329 | 5321 |
| |
5330 | 5322 |
| |
5331 | 5323 |
| |
|
0 commit comments
Comments
(0)