Re: pgsql: Remove "fmgr.h" include in cube contrib --- caused crash on a Ge

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Jeremy Drake <pgsql@jdrake.com>, Alvaro Herrera <alvherre@commandprompt.com>, pgsql-committers <pgsql-committers@postgresql.org>
Date: 2011-09-02T16:52:05Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Remove unnecessary #include references, per pgrminclude script.

  2. Remove "fmgr.h" include in cube contrib --- caused crash on a Gentoo

  3. Allow more include files to be compiled in their own by adding missing

  4. Add support for #elif to pgrminclude.

Bruce Momjian <bruce@momjian.us> writes:
> Tom Lane wrote:
>> Alvaro Herrera <alvherre@commandprompt.com> writes:
>>> instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
>>> MSVC and with C++ compilers. */

>> D'oh ... I bet that last sentence is pointing us at the problem.  cube
>> is using exactly that construct, and for some reason it's crashing.

> I see 35 instances of this coding, and only 12 are in contrib/cube; 
> examples attached.

Yeah, so the next question would be why those other ones aren't showing
problems.  But at least now we have a potential mechanism for getting
from "the include list changed" to "cube is crashing on an offsetof",
namely that something is affecting the expansion of the offsetof macro.
Up to now it's been black magic, and I don't like patching around
problems we don't understand any better than that.

			regards, tom lane