PL/pgsql problem in 6.5

Started by Oliver Grafalmost 27 years ago2 messagesgeneral
Jump to latest
#1Oliver Graf
olli@casbah.ruhr.de

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/

#2M Simms
grim@argh.demon.co.uk
In reply to: Oliver Graf (#1)
Re: [GENERAL] PL/pgsql problem in 6.5

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

At a wild stab in the dark, you installed over an old version of postgresql.

Try running ldconfig (as root), which updates your system and tells it where to
find the latest shared libraries. You may be referencing an old shared library
that is missing some functions.

If that doesnt work, maybee manually remove any out of date postgresql
libraries (just rename them, dont delete them in case they turn out to be
needed {:-) )

This is just a guess, but it is what the error message says to me {:-)