From: | Nikhils <nikkhils(at)gmail(dot)com> |
---|---|
To: | "Dave Page" <dpage(at)pgadmin(dot)org> |
Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, pgsql-patches(at)postgresql(dot)org, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com> |
Subject: | Re: Exposing keywords to clients |
Date: | 2008-07-03 06:52:48 |
Message-ID: | d3c4af540807022352w1876fe8fu60c1533396f9eb2c@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
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
Attachment | Content-Type | Size |
---|---|---|
pg_get_keywords-4.diff | text/x-patch | 7.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Marko Kreen | 2008-07-03 08:15:10 | Re: [PATCHES] pg_dump lock timeout |
Previous Message | Joe Conway | 2008-07-03 04:03:39 | Re: Re: [BUGS] BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code |