1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +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:
Bruce Momjian
2002-07-30 16:20:03 +00:00
parent ceb438ed8c
commit 23a8b77d42
4 changed files with 24 additions and 6 deletions

View File

@ -5,7 +5,7 @@
* 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>.
@ -2347,13 +2347,21 @@ GetConfigOptionByName(const char *name, const char **varname)
* 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);
}