Hi,
> > Attached is an updated patch, giving the following output.
>
> Oh, one other thing: dropping externs into random modules unrelated to
> their source module is completely awful programming style, because there
> is nothing preventing incompatible declarations. Put those externs in
> keywords.h instead.
OK.
> I suspect you have ignored a compiler warning
> about not declaring pg_get_keywords itself, too --- it should be
> extern'd in builtins.h.
No, no warning (I'm using VC++ today) - but fixed anyway.
Update attached, including corrected docs. Note to self - proof read
docs *after* putting the kids to bed in future.
Here are some comments from me:
* doc/src/sgml/func.sgml
a) Changed "localised" to "localized" to be consistent with the references elsewhere in the same file.
* src/backend/utils/adt/misc.c
b) I wonder if we need the default case in the switch statement at all, since we are scanning the statically populated ScanKeywords array with proper category values for each entry.
c) There was a warning during compilation since we were assigning a const pointer to a char pointer
values[0] = ScanKeywords[funcctx->call_cntr].name;
* src/include/catalog/pg_proc.h
d) oid 2700 has been claimed by another function in the meanwhile. Modified it to 2701.
DATA(insert OID = 2701 ( pg_get_keywords PGNSP PGUID 12 10 400 f f t t s 0 2249
e) I was wondering why pronargs is set to 0 above. But I see other functions doing the same, so its ok I guess for such kinds of usages.
PFA, version 4 of this patch with a,c and d taken care of.
Regards,
Nikhils
--
EnterpriseDB
http://www.enterprisedb.com