Tom Lane wrote:
> Alvaro Herrera <[EMAIL PROTECTED]> writes:
> > Andrew Dunstan wrote:
> >> It looks like we'll need some sort of extra filter.
> 
> > Hmm.  Wow.  For example I see
> 
> > FINDREPLACE 
> > FINDREPLACEA
> > FINDREPLACEW
> 
> > We use neither ...  My guess is that they are used in the system DLLs or
> > something like that.
> 
> Presumably we could grep our own sources for each proposed typedef list
> entry --- no hits, you don't get in.

Just came up with this:

> found
> not-found
while read line ; do
        echo "looking for $line"
        rgrep -q --exclude cscope.out --exclude pgtypedefs.bsdos --exclude tags 
"\<$line\>" .
        if [ $? == 0 ]; then
                echo $line >> found
        else
                echo $line >> not-found
        fi
done < pgtypedefs.bsdos


It's simple enough that there are some false matches, for example for
"AV" (which is a symbol we do use, but it also appears in strings etc).
But I'd say it's more than enough.

It does take a while to run though ... it's not something we'll want to
do routinely.

Okay, it finished:

$ wc -l found not-found 
 2035 found
  592 not-found
 2627 total

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to