diff options
| author | Bruce Momjian | 2002-07-30 16:20:03 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2002-07-30 16:20:03 +0000 |
| commit | 23a8b77d42463437f1dd52c601bcfeb858aef7b3 (patch) | |
| tree | d090e865d1e804d12b9bc63afd8197a88ef402d1 /src/backend/utils | |
| parent | ceb438ed8c39bc647e0b0c33cf7d2d7ab2f21b2d (diff) | |
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
Diffstat (limited to 'src/backend/utils')
| -rw-r--r-- | src/backend/utils/misc/guc.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index c90c52e8ccf..4a03c95277b 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -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); } |
