Re[6]: SPI_getvalue problem

From: Alex Guryanow <gav(at)nlr(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re[6]: SPI_getvalue problem
Date: 2001-01-29 09:58:42
Message-ID: 3540.010129@nlr.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Monday, January 29, 2001, 9:49:32 AM Tom wrote:

TL> Alex Guryanow <gav(at)nlr(dot)ru> writes:
>> DEBUG: tupdesc is NULL

TL> Hm. Well, I can assure you that rd_att will *never* be null in a valid
TL> relation cache entry. So there is something wrong with either
TL> CurrentTriggerData, the relation pointer, or your function's
TL> interpretation of the structures.

TL> A thought that comes to mind here is that perhaps your function was
TL> compiled against the wrong set of header files, causing it to think
TL> that rd_att is at a different offset in the relation struct than what
TL> the backend thinks. Do you have more than one version of Postgres
TL> installed on the Solaris machine,

Yes, but they are 7.0.2 and 7.0.3

TL> and if so where are you picking up
TL> the header files while building the library?

Here is my Makefile for trigger

install: test4.so
cp -f test4.so /home/gav/pgsql/lib/trigger.so

test4.so: test4.o
ld -G -Bdynamic -o test4.so test4.o /usr/local/lib/libicuuc.so

test4.o: test4.c
g++ -c -o test4.o -I /home/gav/pgsql/include -I /home/gav/postgresql-7.0.3/src/include test4.c

/home/gav/postgresql-7.0.3 is catalog with sources
/home/gav/pgsql is target for installation (./configure --prefix=/home/gav/pgsql ...)

By the way. To compile using g++ I have added two lines to src/include/nodes/parsenodes.h:

#ifndef PARSENODES_H
#define PARSENODES_H

+ #define typename gav_typename
+ #define class gav_class
#include "nodes/primnodes.h"

because without them g++ encounters some errors. Possible this is the cause?

Best regards,
Alex

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joseph 2001-01-29 11:48:02 Rule problem with access 97
Previous Message Gilles DAROLD 2001-01-29 09:29:59 Re: Connection Pool