Thomas Hallgren <thomas.hallgren@home.se> writes:
> tgl@sss.pgh.pa.us wrote:
>> No.  Define 'em yourself.
>> 
> OK, I can do that. But I have a couple of reasons why I think that it 
> would be a good idea to get my definitions into node.h:
> - If more module authors want to do similar things, they would not risk 
> defining overlapping tags.
Only for those module authors who manage to get their tags accepted;
and even for them, only for PG versions later than when they start
working.  Not much of an extension mechanism, is it?
> - The NodeTag is an enum. Code that defines tags that are supposed to 
> "fit in" becomes ugly.
I don't see anyone trying to "switch" over MemoryContext tags, so this
is really pretty irrelevant.  AFAICS it should work just fine to do
#define T_FooNode  ((NodeTag) (T_FirstPrivateNode + 1))
> - The IsA macro can be used.
Still can AFAICS --- that macro knows nothing about the enum, just about
the convention that Foo and T_Foo are related names.
> - You (PostgreSQL core) want full control over the tags. If all tags are 
> in nodes.h, you can move tags to other number ranges without creating a 
> hassle for people like me.
As long as you define your tag as T_Something + N, that still holds.
        regards, tom lane