guc GetConfigOptionByNum and tablefunc API - minor changes

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: guc GetConfigOptionByNum and tablefunc API - minor changes
Date: 2002-07-21 03:38:30
Message-ID: 3D3A2CB6.9080102@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-patches

Tom Lane wrote:
> One thing that possibly needs discussion is the handling of
> GUC_NO_SHOW_ALL. I moved that test into the SHOW ALL code because
> the intended behavior is for the marked variable to not be in the
> SHOW ALL output at all, rather than be there with a null value as
> your patch originally behaved. Now that was fine for SHOW ALL because
> it can examine the config record directly anyway, but what of external
> callers of GetConfigOptionByNum? There aren't any right now so I'm
> kind of speculating in a vacuum about what they'll want. But it seems
> possible that they will want to be able to discover whether the var is
> marked NO_SHOW_ALL or not. Maybe that should be an additional return
> variable from GetConfigOptionByNum, along the lines of
>
> GetConfigOptionByNum(..., bool *noshow)
> {
> if (noshow)
> *noshow = (conf->flags & GUC_NO_SHOW_ALL) ? true : false;
> }
>
> Any thoughts?
>
> Oh btw: an Assert() verifying that the arg of GetConfigOptionByNum is
> in range wouldn't be out of place, I think.

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.

If there are no objections, please apply.

Thanks,

Joe

Attachment Content-Type Size
tablefunc_doc_mod.2002.07.20.1.patch text/plain 1.1 KB
guc_and_tablefunc_mod.2002.07.20.1.patch text/plain 4.8 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian - CVS 2002-07-21 04:39:52 pgsql/doc/TODO.detail schema
Previous Message Bruce Momjian 2002-07-21 01:41:54 Re: pgsql/ ontrib/dbsize/dbsize.c ontrib/fulltexti ...

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2002-07-21 03:47:31 Re: Table Function API doc patch
Previous Message Tom Lane 2002-07-21 02:00:01 Re: [PATCHES] prepareable statements