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

From Tom Lane
Subject Re: Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend
Date
Msg-id 7711.1358523786@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List 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 by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: WIP patch for hint bit i/o mitigation
Next
From: Andres Freund
Date:
Subject: Re: Event Triggers: adding information