Re: avoid including rel.h in execnodes.h - Mailing list pgsql-hackers

From Tom Lane
Subject Re: avoid including rel.h in execnodes.h
Date
Msg-id 6478.1309558850@sss.pgh.pa.us
Whole thread Raw
In response to avoid including rel.h in execnodes.h  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: avoid including rel.h in execnodes.h
List pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> This simple patch moves two struct declarations (Trigger and
> TriggerDesc) from rel.h into a new file, reltrigger.h.  The benefit is
> that execnodes.h only needs to include the latter.  Since execnodes.h is
> very widely included, this change means there are less files that
> indirectly include rel.h now, which is a good thing because rel.h
> includes a ton of other files.  (Of course, rel.h itself needs to
> include the new header).

OK ...

> I also included rel.h in spi.h, because it was previously indirectly
> included via execnodes.h and with this patch it would no longer be,
> which is a problem because it'd cause external code to fail to compile.

If we think that not including rel.h unnecessarily is a good thing, then
that should surely apply to external code as well.  So -1 for that bit.
It's not like we have not removed stuff from spi.h before.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: beta3?
Next
From: Tom Lane
Date:
Subject: Re: SECURITY LABEL on shared database object