Re: Lock partitions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Wong <markw(at)osdl(dot)org>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Lock partitions
Date: 2006-09-14 19:23:48
Message-ID: 2141.1158261828@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mark Wong <markw(at)osdl(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-09-14 19:27:34 Re: XML support wiki page
Previous Message Stephen Frost 2006-09-14 19:18:43 Re: New version of money type