PL/pgsql problem in 6.5

From: Oliver Graf <olli(at)casbah(dot)ruhr(dot)de>
To: <pgsql-general(at)postgreSQL(dot)org>
Subject: PL/pgsql problem in 6.5
Date: 1999-06-17 05:54:07
Message-ID: 99061708010000.03397@casbah
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi everybody,

I have just installed PostgreSQL 6.5 and encountered problems with
PL/pgsql: On an insert into a table which has a before-insert trigger
I get the following error message:

ERROR: Load of file /usr/local/pgsql/lib/plpgsql.so failed: /usr/local/pgsql/lib/plpgsql.so:
undefined symbol: SPI_push

What's wrong with my installation?

The trigger looks like this:

DECLARE
content CONSTANT VARCHAR (1) DEFAULT 'N';
new_series art.series%TYPE;
new_rating art.rating%TYPE;
anzahl INT4;
max_indx art.indx%TYPE;

BEGIN
new_series := NEW.series;
new_rating := NEW.rating;

SELECT COUNT (*)
INTO anzahl
FROM series
WHERE ke_content = content
AND series = new_series;

IF anzahl = 0 THEN
SELECT NVL (MAX (indx), 0) + 1
INTO max_indx
FROM series;

INSERT INTO series (ke_content, series, indx, rating)
VALUES (content, new_series, max_indx, new_rating);
END IF;

RETURN NEW;
END;

--
Oliver Graf
Oberhofstr. 11
D-44575 Castrop-Rauxel, Germany
Phone: +49 2305 14230
http://www.ruhr.de/home/casbah/

Browse pgsql-general by date

  From Date Subject
Next Message Alexander N Shulyak 1999-06-17 07:05:56 About bug reports
Previous Message Thomas Reinke 1999-06-17 02:54:23 Re: [GENERAL] Rebuilding Primary Key???