Re: Is custom MemoryContext prohibited?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Is custom MemoryContext prohibited?
Дата
Msg-id CA+TgmoZUAgkD9oqOedt=Ykvi_DW6J+drtU9Bjtn4omSnO_hN2g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Is custom MemoryContext prohibited?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Is custom MemoryContext prohibited?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Feb 5, 2020 at 10:09 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> an enum field right in the context.  You'll have to do an extra step to
> discover the context's type, and if you jump to the wrong conclusion
> and do, say,
>         p *(AllocSetContext *) ptr_value
> when it's really some other context type, there won't be anything
> as obvious as "type = T_GenerationContext" in what is printed to
> tell you you were wrong.

Doesn't the proposed magic number address this concern?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Is custom MemoryContext prohibited?
Следующее
От: Konstantin Knizhnik
Дата:
Сообщение: Re: [Proposal] Global temporary tables