This page in other versions: Unsupported versions: 6.4 / 6.5 / 7.0

SPI_modifytuple

Name

SPI_modifytuple — Modifies tuple of relation
SPI_modifytuple(rel, tuple , nattrs
, attnum , Values , Nulls)

Inputs

Relation rel
HeapTuple tuple

Input tuple to be modified

int nattrs

Number of attribute numbers in attnum

int * attnum

Array of numbers of the attributes which are to be changed

Datum * Values

New values for the attributes specified

char * Nulls

Which attributes are NULL, if any

Outputs

HeapTuple

New tuple with modifications

non-NULL if tuple is not NULL and the modify was successful
NULL only if tuple is NULL
SPI_result
SPI_ERROR_ARGUMENT if rel is NULL or tuple is NULL or natts ≤ 0 or attnum is NULL or Values is NULL.
SPI_ERROR_NOATTRIBUTE if there is an invalid attribute number in attnum (attnum ≤ 0 or > number of attributes in tuple)

Description

SPI_modifytuple Modifies a tuple in upper Executor context. See the section on Memory Management.

Usage

If successful, a pointer to the new tuple is returned. The new tuple is allocated in upper Executor context (see Memory management). Passed tuple is not changed.

Submit correction

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.

Privacy Policy | About PostgreSQL
Copyright © 1996-2016 The PostgreSQL Global Development Group