Re: make_ctags: use -I option to ignore pg_node_attr macro

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: nagata(at)sraoss(dot)co(dot)jp
Cc: alvherre(at)alvh(dot)no-ip(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: make_ctags: use -I option to ignore pg_node_attr macro
Date: 2022-10-12 11:40:21
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


>> > I found that tag files generated by src/tools/make_ctags
>> > doesn't include some keywords, that were field names of node
>> > structs, for example norm_select in RestrictInfo. Such fields
>> > are defined with pg_node_attr macro that was introduced
>> > recently, like:
>> >
>> > Selectivity norm_selec pg_node_attr(equal_ignore);
>> >
>> > In this case, pg_node_attr is mistakenly interpreted to be
>> > the name of the field. So, I propose to use -I option of ctags
>> > to ignore the marco name. Attached is a patch to do it.

I found the same issue with make_etags too.

> I updated the patch to ignore the code under tmp_install and add
> some file types like sql, p[lm], and so on. .sgml or .sh is not
> included because they don't seem to be beneficial for ctags.

I tried to apply the v2 patch approach to make_etags but noticed that
make_ctags and make_etags have quite a few duplicate codes, that would
bring maintenance headache. I think we could merge make_etags into
make_ctags, then add "-e" option (or whatever) to make_ctags so that
it generates tags files for emacs if the option is specified.

Patch attahced.

Best reagards,
Tatsuo Ishii

Attachment Content-Type Size
v3_make_ctags.patch text/x-patch 2.0 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2022-10-12 11:52:35 Re: Proposal to provide the facility to set binary format output for specific OID's per session
Previous Message Richard Guo 2022-10-12 11:29:58 Re: Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant