Mark Wong <markw@osdl.org> writes:
> Oops! 'autoreconf --install' is what I run to generate all that stuff.
Ah, better. I see at least part of the problem:
CREATE OR REPLACE FUNCTION stock_level (INTEGER, INTEGER, INTEGER) RETURNS INTEGER AS
'/home/tgl/dbt2/storedproc/pgsql/c/../../../storedproc/pgsql/c/funcs'LANGUAGE C STRICT;
psql:/home/tgl/dbt2/scripts/pgsql/../../storedproc/pgsql/c/stock_level.sql:7: ERROR: incompatible library
"/home/tgl/dbt2/storedproc/pgsql/c/../../../storedproc/pgsql/c/funcs.so":missing magic block
HINT: Extension libraries are now required to use the PG_MODULE_MAGIC macro.
You need to add something like this to funcs.c:
#include <executor/spi.h> /* this should include most necessary APIs */ #include <executor/executor.h> /* for
GetAttributeByName()*/ #include <funcapi.h> /* for returning set of rows in order_status */
+
+ #ifdef PG_MODULE_MAGIC
+ PG_MODULE_MAGIC;
+ #endif /* #define DEBUG
With that change, I didn't see run_workload report any errors, but maybe
I don't know where to look. I'm not sure how this bug could have led to
a "type not registered" error ... the query should've just failed outright.
regards, tom lane