Re: Unused header file inclusion - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Unused header file inclusion
Date
Msg-id 20190816230716.jndus364yfcz4sr6@alap3.anarazel.de
Whole thread Raw
In response to Re: Unused header file inclusion  (Andres Freund <andres@anarazel.de>)
Responses Re: Unused header file inclusion  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On 2019-08-03 12:37:33 -0700, Andres Freund wrote:
> Think the first three are pretty clearly a good idea, I'm a bit less
> sanguine about the fourth:
> Headers like utils/timestamp.h are often included just because we need a
> TimestampTz type somewhere, or call GetCurrentTimestamp(). Approximately
> none of these need the PG_GETARG_* macros, which are the only reason for
> including fmgr.h in these headers.  As they're macros that's not
> actually needed, although I think normally good style. But I' think here
> avoiding exposing fmgr.h to more headers is a bigger win.

I still think the fourth is probably worthwhile, but I don't feel
confident enough to do it without somebody else +0.5'ing it...

I've pushed the other ones.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: default_table_access_method is not in sample config file
Next
From: Greg Stark
Date:
Subject: Can't we give better table bloat stats easily?