From 23a8b77d42463437f1dd52c601bcfeb858aef7b3 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 30 Jul 2002 16:20:03 +0000 Subject: Here are two patches. The guc_and_tablefunc patch addresses the two changes mentioned above, and also adds a new function to the tablefunc API. The tablefunc API change adds the following function: * Oid foidGetTypeId(Oid foid) - Get a function's typeid given the * function Oid. Use this together with TypeGetTupleDesc() to get a * TupleDesc which is derived from the function's declared return type. In the next post I'll send the contrib/tablefunc patch, which illustrates the usage of this new function. Also attached is a doc patch for this change. The doc patch also adds a function that I failed to document previously. Joe Conway --- doc/src/sgml/xfunc.sgml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'doc/src') diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml index bb7f742f69f..91d1849d529 100644 --- a/doc/src/sgml/xfunc.sgml +++ b/doc/src/sgml/xfunc.sgml @@ -1,5 +1,5 @@ @@ -1556,6 +1556,14 @@ HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values) should be set to NULL. + + In order to get an attribute "in" function and typelem value given the + typeid, use + +void get_type_metadata(Oid typeid, Oid *attinfuncid, Oid *attelem) + + + Finally, in order to return a tuple using the SRF portion of the API (described below), the tuple must be converted into a Datum. Use -- cgit v1.2.3