1SPI_PUSH(3)             PostgreSQL 9.2.24 Documentation            SPI_PUSH(3)
2
3
4

NAME

6       SPI_push - push SPI stack to allow recursive SPI usage
7

SYNOPSIS

9       void SPI_push(void)
10

DESCRIPTION

12       SPI_push should be called before executing another procedure that might
13       itself wish to use SPI. After SPI_push, SPI is no longer in a
14       “connected” state, and SPI function calls will be rejected unless a
15       fresh SPI_connect is done. This ensures a clean separation between your
16       procedure's SPI state and that of another procedure you call. After the
17       other procedure returns, call SPI_pop to restore access to your own SPI
18       state.
19
20       Note that SPI_execute and related functions automatically do the
21       equivalent of SPI_push before passing control back to the SQL execution
22       engine, so it is not necessary for you to worry about this when using
23       those functions. Only when you are directly calling arbitrary code that
24       might contain SPI_connect calls do you need to issue SPI_push and
25       SPI_pop.
26
27
28
29PostgreSQL 9.2.24                 2017-11-06                       SPI_PUSH(3)
Impressum