Re: C-functions using SPI Missing Magic Block Error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Saitenheini(at)web(dot)de
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: C-functions using SPI Missing Magic Block Error
Date: 2010-07-02 14:12:42
Message-ID: 13364.1278079962@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Saitenheini(at)web(dot)de writes:
> I compiled the file "pgExampleSPI.c" with the following code without any error:

> /* Use 32-bit timer (provided header file uses 64-bit timer, not
> * compatible with Windows postgreSQL versions */
> #define _USE_32BIT_TIME_T

> #include "postgres.h"
> #include "executor\spi.h"

> #ifdef PG_MODULE_MAGIC
> PG_MODULE_MAGIC;
> #endif

That's not going to do anything because you didn't #include the header
that defines PG_MODULE_MAGIC. I think it's fmgr.h but not sure offhand.
I'd suggest taking out the #ifdef so you actually get an error if the
definition isn't provided.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Browne 2010-07-02 15:05:16 Re: Scheduling backup
Previous Message Guillaume Lelarge 2010-07-02 14:08:06 Re: pgpool-II (max_pool and num_init_children)