mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.53 2002/07/18 04:47:17 momjian Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.54 2002/07/30 16:20:03 momjian Exp $
|
||||
-->
|
||||
|
||||
<chapter id="xfunc">
|
||||
@ -1556,6 +1556,14 @@ HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values)
|
||||
should be set to NULL.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In order to get an attribute "in" function and typelem value given the
|
||||
typeid, use
|
||||
<programlisting>
|
||||
void get_type_metadata(Oid typeid, Oid *attinfuncid, Oid *attelem)
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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
|
||||
|
Reference in New Issue
Block a user