1SPI_RETURNTUPLE(3) PostgreSQL 9.2.24 Documentation SPI_RETURNTUPLE(3)
2
3
4
6 SPI_returntuple - prepare to return a tuple as a Datum
7
9 HeapTupleHeader SPI_returntuple(HeapTuple row, TupleDesc rowdesc)
10
12 SPI_returntuple makes a copy of a row in the upper executor context,
13 returning it in the form of a row type Datum. The returned pointer need
14 only be converted to Datum via PointerGetDatum before returning.
15
16 Note that this should be used for functions that are declared to return
17 composite types. It is not used for triggers; use SPI_copytuple for
18 returning a modified row in a trigger.
19
21 HeapTuple row
22 row to be copied
23
24 TupleDesc rowdesc
25 descriptor for row (pass the same descriptor each time for most
26 effective caching)
27
29 HeapTupleHeader pointing to copied row; NULL only if row or rowdesc is
30 NULL
31
32
33
34PostgreSQL 9.2.24 2017-11-06 SPI_RETURNTUPLE(3)