| tupleTypes {REmbeddedPostgres} | R Documentation |
These functions allow the caller to access the values and descriptions of each of the elements in a Postgres tuple stored internally at the C-level.
tupleTypes(ref) tupleValues(ref)
ref |
an object of class PostgresTupleRef
that is passed to the R function
from a Postgres trigger function invocation and is given
as an opaque reference.
Such an object is stored as a numeric vector of length 3,
and its contents are actually memory addresses that should not
be used directly.
|
These functions call C code that resolves the Postgres objects and perform the appropriate operations by querying the Postgres tables for a description of the tuple.
tupleValues returns a named list containing
the values contained in the tuple, having been converted
to regular R objects (where possible).
The names are the field/column names of the Postgres tuple.
tupleTypes returns a named character vector whose
elements are the names of the Postgres data type for the corresponding
element in the tuple. The names of the elements are again the field/column
names of the Postgres tuple.
Duncan Temple Lang
http://www.postgresql.org, http://www.omegahat.org/DBMS/Postgres/R
[.PostgresTupleRef
setTupleElements
tupleValues(tup) tupleTypes(tup)