postgresql/src/backend
Peter Eisentraut b3617cdfbb Move portal pinning from PL/pgSQL to SPI
PL/pgSQL "pins" internally generated (unnamed) portals so that user code
cannot close them by guessing their names.  This logic is also useful in
other languages and really for any code.  So move that logic into SPI.
An unnamed portal obtained through SPI_cursor_open() and related
functions 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, preventing
users from manually closing cursors created by spi_query and
plpy.cursor, respectively.  (PL/Tcl does not currently offer any cursor
functionality.)

Reviewed-by: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
2018-01-10 10:20:51 -05:00
..
access Change some bogus PageGetLSN calls to BufferGetLSNAtomic 2018-01-09 17:06:31 -03:00
bootstrap Update copyright for 2018 2018-01-02 23:30:12 -05:00
catalog Minor preparatory refactoring for UPDATE row movement. 2018-01-04 16:25:49 -05:00
commands Remove PortalGetQueryDesc() 2018-01-09 13:47:56 -05:00
executor Move portal pinning from PL/pgSQL to SPI 2018-01-10 10:20:51 -05:00
foreign Update copyright for 2018 2018-01-02 23:30:12 -05:00
lib Update copyright for 2018 2018-01-02 23:30:12 -05:00
libpq Another attempt at fixing build with various OpenSSL versions 2018-01-04 19:09:27 -05:00
main Update copyright for 2018 2018-01-02 23:30:12 -05:00
nodes Rewrite list_qsort() to avoid trashing its input list. 2018-01-09 13:25:53 -05:00
optimizer Improve the heuristic for ordering child paths of a parallel append. 2018-01-09 13:07:52 -05:00
parser Don't allow VACUUM VERBOSE ANALYZE VERBOSE. 2018-01-09 10:20:48 -05:00
po Translation updates 2017-08-07 13:55:34 -04:00
port Update copyright for 2018 2018-01-02 23:30:12 -05:00
postmaster Update copyright for 2018 2018-01-02 23:30:12 -05:00
regex Update copyright for 2018 2018-01-02 23:30:12 -05:00
replication Fix race condition during replication origin drop. 2018-01-09 12:09:30 -05:00
rewrite Update copyright for 2018 2018-01-02 23:30:12 -05:00
snowball Update copyright for 2018 2018-01-02 23:30:12 -05:00
statistics Update copyright for 2018 2018-01-02 23:30:12 -05:00
storage While waiting for a condition variable, detect postmaster death. 2018-01-09 12:34:57 -05:00
tcop Remove PortalGetQueryDesc() 2018-01-09 13:47:56 -05:00
tsearch Update copyright for 2018 2018-01-02 23:30:12 -05:00
utils Give more accurate error message for dropping pinned portal 2018-01-10 09:22:07 -05:00
.gitignore
common.mk Add ICU_CFLAGS to global CPPFLAGS 2017-06-12 15:57:22 -04:00
Makefile Update copyright for 2018 2018-01-02 23:30:12 -05:00
nls.mk Translation updates 2017-05-15 12:19:54 -04:00