1SPI_REGISTER_TRIGGER_DATA(P3o)stgreSQL 14.3 DocumentatSiPoIn_REGISTER_TRIGGER_DATA(3)
2
3
4

NAME

6       SPI_register_trigger_data - make ephemeral trigger data available in
7       SPI queries
8

SYNOPSIS

10       int SPI_register_trigger_data(TriggerData *tdata)
11

DESCRIPTION

13       SPI_register_trigger_data makes any ephemeral relations captured by a
14       trigger available to queries planned and executed through the current
15       SPI connection. Currently, this means the transition tables captured by
16       an AFTER trigger defined with a REFERENCING OLD/NEW TABLE AS ...
17       clause. This function should be called by a PL trigger handler function
18       after connecting.
19

ARGUMENTS

21       TriggerData *tdata
22           the TriggerData object passed to a trigger handler function as
23           fcinfo->context
24

RETURN VALUE

26       If the execution of the command was successful then the following
27       (nonnegative) value will be returned:
28
29       SPI_OK_TD_REGISTER
30           if the captured trigger data (if any) has been successfully
31           registered
32
33       On error, one of the following negative values is returned:
34
35       SPI_ERROR_ARGUMENT
36           if tdata is NULL
37
38       SPI_ERROR_UNCONNECTED
39           if called from an unconnected C function
40
41       SPI_ERROR_REL_DUPLICATE
42           if the name of any trigger data transient relation is already
43           registered for this connection
44
45
46
47PostgreSQL 14.3                      2022         SPI_REGISTER_TRIGGER_DATA(3)
Impressum