Re: pg_filedump 9.3: checksums (and a few other fixes)
От | Tom Lane |
---|---|
Тема | Re: pg_filedump 9.3: checksums (and a few other fixes) |
Дата | |
Msg-id | 11762.1371229167@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: pg_filedump 9.3: checksums (and a few other fixes) (Andres Freund <andres@2ndquadrant.com>) |
Список | 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 по дате отправления: