Re: Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend
Дата
Msg-id 7711.1358523786@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> One slight problem with this is the common port/*.c idiom would require
> an extra include:

> #ifndef FRONTEND
> #include "postgres.h"
> #else
> #include "postgres_fe.h"
> #include "pgassert.h"        /* <--- new line required here */
> #endif /* FRONTEND */

> If this is seen as a serious issue (I don't think so) then we would have
> to include pgassert.h into postgres_fe.h which would make the whole
> thing pointless (i.e. the same as just having the definitions in c.h).

We'd only need to add that when/if the file started to use asserts,
so I don't think it's a problem.  But still not sure it's better than
just putting the stuff in c.h.
        regards, tom lane



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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: WIP patch for hint bit i/o mitigation
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Event Triggers: adding information