| names.PostgresTupleRef {REmbeddedPostgres} | R Documentation |
This retrieves the names of each of the fields within a Postgres
tuple that is involved in a trigger event on a database table
due to an INSERTION, DELETION or UPDATE action on that table.
In conjunction with tupleValues,
tupleTypes and
setTupleElements, an R trigger function
can access and modify the entries in the tuple.
names.PostgresTupleRef(ref)
ref |
an object of class
PostgresTupleRef that contains the address of a C-level
object which stores the record for which a trigger event was
generated.
|
The tuple reference is passed to the R function as a result
of a trigger event (INSERT, UPDATE or DELETE action on a table)
within Postgres and the trigge function being implemented in
the Postgres procedural language plR.
Rather than copy the contents of the tuple being modified
and passing them to R, we give a reference to the instance of
that tuple so that the user can modify it directly before returning
it to Postgres. This allows the R function to alter insertions
that are pending.
A character vector containing the names of the fields within the Postgres tuple reference by the argument.
Duncan Temple Lang
http://www.postgresql.org, http://www.omegahat.org/DBMS/Postgres/R
tupleValues,
tupleTypes
[.PostgresTupleRef
names(tup) tup[names(tup)] # tupleValues(tup)