<!--
-$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">
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
* command, configuration file, and command line options.
* See src/backend/utils/misc/README for more information.
*
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.75 2002/07/20 15:12:55 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.76 2002/07/30 16:20:03 momjian Exp $
*
* Copyright 2000 by PostgreSQL Global Development Group
* Written by Peter Eisentraut <peter_e@gmx.net>.
* form of name. Return value is palloc'd.
*/
char *
-GetConfigOptionByNum(int varnum, const char **varname)
+GetConfigOptionByNum(int varnum, const char **varname, bool *noshow)
{
- struct config_generic *conf = guc_variables[varnum];
+ struct config_generic *conf;
+
+ /* check requested variable number valid */
+ Assert((varnum >= 0) && (varnum < num_guc_variables));
+
+ conf = guc_variables[varnum];
if (varname)
*varname = conf->name;
+ if (noshow)
+ *noshow = (conf->flags & GUC_NO_SHOW_ALL) ? true : false;
+
return _ShowOption(conf);
}
* HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values) -
* build a HeapTuple given user data in C string form. values is an array
* of C strings, one for each attribute of the return tuple.
+ * void get_type_metadata(Oid typeid, Oid *attinfuncid, Oid *attelem) - Get
+ * an attribute "in" function and typelem value given the typeid.
*
* Macro declarations:
* TupleGetDatum(TupleTableSlot *slot, HeapTuple tuple) - get a Datum
* External declarations pertaining to backend/utils/misc/guc.c and
* backend/utils/misc/guc-file.l
*
- * $Id: guc.h,v 1.19 2002/07/20 15:12:56 tgl Exp $
+ * $Id: guc.h,v 1.20 2002/07/30 16:20:03 momjian Exp $
*/
#ifndef GUC_H
#define GUC_H
extern void ShowGUCConfigOption(const char *name);
extern void ShowAllGUCConfig(void);
extern char *GetConfigOptionByName(const char *name, const char **varname);
-extern char *GetConfigOptionByNum(int varnum, const char **varname);
+extern char *GetConfigOptionByNum(int varnum, const char **varname, bool *noshow);
extern int GetNumConfigOptions(void);
extern void SetPGVariable(const char *name, List *args, bool is_local);