Re: Rethinking MemoryContext creation
От | Robert Haas |
---|---|
Тема | Re: Rethinking MemoryContext creation |
Дата | |
Msg-id | CA+TgmoZx=248OF_KWp8zDHH+pZjOh3i5MW_r0qo3XF5U19oZjA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Rethinking MemoryContext creation (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Rethinking MemoryContext creation
|
Список | pgsql-hackers |
On Mon, Dec 11, 2017 at 12:36 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > [ thinks... ] If we wanted to go that way, one thing we could do to > help extension authors (and ourselves) is to define the proposed > AllocSetContextCreate macro to include > > StaticAssertExpr(__builtin_constant_p(name)) > > on compilers that have __builtin_constant_p. Now, that only helps > people using gcc and gcc-alikes, but that's a large fraction of > developers I should think. (I tested this and it does seem to > correctly recognize string literals as constants.) I like that idea. I think that would provide good protection not only for third-party developers but for core developers. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: