Re: MemoryContext and NodeTags

Поиск
Список
Период
Сортировка
От Thomas Hallgren
Тема Re: MemoryContext and NodeTags
Дата
Msg-id 4353B558.7040705@home.se
обсуждение исходный текст
Ответ на Re: MemoryContext and NodeTags  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: MemoryContext and NodeTags  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
tgl@sss.pgh.pa.us wrote:
> Thomas Hallgren <thomas.hallgren@home.se> writes:
>   
>> I have a proposal:
>> The NodeTag T_MemoryContext has the value of 600 and the next occupied 
>> entry is T_Value which is 650.
>> - Reserve half of that range for PostgreSQL specific contexts (today you 
>> only use one), and the other half for custom contexts.
>>     
>
> OK.
>
>   
>> - Accept patches to nodes/nodes.h for new custom tags (properly 
>> motivated of course).
>>     
>
> 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.
- The NodeTag is an enum. Code that defines tags that are supposed to 
"fit in" becomes ugly.
- The IsA macro can be used.
- 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.

Regards,
Thomas Hallgren.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: MemoryContext and NodeTags
Следующее
От: Tom Lane
Дата:
Сообщение: Re: MemoryContext and NodeTags