HeapTuple SPI_modifytuple(Relation rel, HeapTuple row, int ncols, int * colnum, Datum * values, const char * nulls)
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
Used only as the source of the row descriptor for the row. (Passing a relation rather than a row descriptor is a misfeature.)
row to be modified
number of columns to be changed
an array of length ncols, containing the numbers of the columns that are to be changed (column numbers start at 1)
an array of length ncols, containing the new values for the specified columns
an array of length ncols, describing which new values are null
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'
new row with modifications, allocated in the upper executor context; NULL only if row is NULL
On error, SPI_result is set as follows:
if rel is NULL, or if row is NULL, or if ncols is less than or equal to 0, or if colnum is NULL, or if values is NULL.
if colnum contains an invalid column number (less than or equal to 0 or greater than the number of column in row)
Please use this form to add your own comments regarding your experience with particular features of PostgreSQL, clarifications of the documentation, or hints for other users. Please note, this is not a support forum, and your IP address will be logged. If you have a question or need help, please see the faq, try a mailing list, or join us on IRC. Note that submissions containing URLs or other keywords commonly found in 'spam' comments may be silently discarded. Please contact the webmaster if you think this is happening to you in error.
Proceed to the comment form.