Skip site navigation (1) Skip section navigation (2)

Re: Exposing keywords to clients

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches

> > 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.


Attachment: pg_get_keywords-4.diff
Description: text/x-patch (7.4 KB)

In response to


pgsql-patches by date

Next:From: Marko KreenDate: 2008-07-03 08:15:10
Subject: Re: [PATCHES] pg_dump lock timeout
Previous:From: Joe ConwayDate: 2008-07-03 04:03:39
Subject: Re: Re: [BUGS] BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group