Re: pg_filedump 9.3: checksums (and a few other fixes) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_filedump 9.3: checksums (and a few other fixes)
Date
Msg-id 11762.1371229167@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_filedump 9.3: checksums (and a few other fixes)  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2013-06-14 11:59:04 -0400, Tom Lane wrote:
>> Ah, you are right, I forgot the #ifndef CHECKSUM_IMPL_H dance.  Will fix
>> in a bit.

> That won't help against errors if it's included in two different
> files/translation units though.

Good point, but there's not any real reason to do that --- only
checksum.h should ever be #include'd in more than one file.  Any program
using this stuff is expected to #include checksum_impl.h in exactly one
place.  So maybe it's fine as-is.

> E.g. in rmgrlist.h we have the following comment:
> /* there is deliberately not an #ifndef RMGRLIST_H here */
> and I think the reasoning behind that comment applies here as well.

Well, that's a different case: there, and also in kwlist.h, there's an
idea that it could actually be useful to #include the file more than
once, redefining the PG_RMGR() macro each time.  There's no such use
case that I can see for checksum_impl.h.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: MD5 aggregate
Next
From: Jeff Davis
Date:
Subject: Re: fallocate / posix_fallocate for new WAL file creation (etc...)