table of contents
- stretch 9.6.12-0+deb9u1
SPI_MODIFYTUPLE(3) | PostgreSQL 9.6.12 Documentation | SPI_MODIFYTUPLE(3) |
NAME¶
SPI_modifytuple - create a row by replacing selected fields of a given rowSYNOPSIS¶
HeapTuple SPI_modifytuple(Relation rel, HeapTuple row, int ncols, int * colnum, Datum * values, const char * nulls)
DESCRIPTION¶
SPI_modifytuple creates a new row by substituting new values for selected columns, copying the original row's columns at other positions. The input row is not modified.ARGUMENTS¶
Relation relHeapTuple row
int ncols
int * colnum
Datum * values
const char * nulls
If nulls is NULL then SPI_modifytuple assumes that no new values are null. Otherwise, each entry of the nulls array should be ' ' if the corresponding new value is non-null, or 'n' if the corresponding new value is null. (In the latter case, the actual value in the corresponding values entry doesn't matter.) Note that nulls is not a text string, just an array: it does not need a '\0' terminator.
RETURN VALUE¶
new row with modifications, allocated in the upper executor context; NULL only if row is NULLOn error, SPI_result is set as follows:
SPI_ERROR_ARGUMENT
SPI_ERROR_NOATTRIBUTE
2019 | PostgreSQL 9.6.12 |