Am Freitag, 29. Februar 2008 schrieb Robert Lor:
> Currently, pg_trace.h is included in c.h, and I feel strongly that it
> should remains there because by design I'd like to
> 1) have the tracing feature be available both in the frontend and
> backend without having to do anything extra,
I think each component would have its own probes definition file.
> which also means that
> probes.h needs to be generated before any compilation
Well, you are going to have to do a lot more work on the makefiles if you want
to do it that way. Make works by defining dependencies between files, not by
hoping that people will execute the commands in the order you write them. If
you want every single file in the tree to depend on a rule, you will have to
do something different.
> 2) centralize the include of this header just in case the
> implementation needs to be changed for some reason (eg, if this file
> needs to be splitted, etc)
We have no evidence that anything like that will ever happen.
> 3) reduce the number of changes to a minimal when adding new probes to
> new .c files
These arguments seem irrelevant in my mind. When you add new function calls,
you will usually have to add new header files as well. It's the normal way
to do things.
> I haven't heard any major disadvantages about keeping it in c.h, but if
> you are still adamant about keeping it out of c.h, I'll will go along
> with that.
Including only what you need is a principle. It keeps the namespace clean, it
speads up compilation time, it makes the build system simpler and more
efficient. Otherwise we'd only need one header file for everything.
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not