7.2.1: Can't create prcedural language PLPERL

Started by Ruslan A Dautkhanovover 23 years ago3 messagesbugs
Jump to latest
#1Ruslan A Dautkhanov
rusland@scn.ru

Hi,

I have to use PlPerl procedural language to write my
functions on PostgreSQL. I have recompiled Perl interpreter,
so libperl now built as a shared library. After this I had
done
perl Makefile.pl; make; make install
All is good, but when I tries to run
createlang ... plperl
it fail. I found where error is (createlang -e shows queries) -
CREATE FUNCTION "plperl_call_handler" () RETURNS OPAQUE AS
'$libdir/plperl.so' LANGUAGE C;

ERROR: Load of file /usr/local/pgsql/lib/plperl.so failed: dlopen
'/usr/local/pgsql/lib/plperl.so' failed.
(/usr/local/pgsql/lib/plperl.so: Undefined symbol "Perl_vmess")

Where my mistake is or maybe PG7.2.1 just can't properly use plperl
procudural language???
and that is the reason why you break plperl code from base source pack
in the next release 7.3?
Btw, gborg.postgresql.org as I see just only CVS visualizer, but it's
not a userland site -
I even not see a download link anywhere or any instructions how to
install it.

Thanks a lot for any comments/suggestions, which can help me to make
plperl work.

Regards,
Ruslan

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Ruslan A Dautkhanov (#1)
problem with TRUNCATE TABLE in plpgsql function

Hi all

I played with some own old plpgsql functions. I found "error" in plpgsql
7.3. When I use TRUNCATE TABLE in function I get

TRUNCATE TABLE cannot be executed from a function.

In 7.2.2. I can use this command. Why, now I can't use truncate table?

Thank you
Pavel Stehule

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Pavel Stehule (#2)
Re: problem with TRUNCATE TABLE in plpgsql function

Pavel Stehule <stehule@kix.fsv.cvut.cz> writes:

I played with some own old plpgsql functions. I found "error" in plpgsql
7.3. When I use TRUNCATE TABLE in function I get
TRUNCATE TABLE cannot be executed from a function.
In 7.2.2. I can use this command. Why, now I can't use truncate table?

This is a deliberate change for safety reasons: if your function errors
out after performing TRUNCATE, you are in big trouble.

If TRUNCATE is ever rewritten to be rollback-safe, we will remove the
restriction.

regards, tom lane