I mentioned in #postgres a bit ago to no avail that I couldn't get my plperl stored procedures to work after upgrading to OS X 10.5, with only a obtuse "ERROR: null prosrc". I was using 8.2.4 and didn't want to make a big deal about a non-current release, but today I had a chance to build 8.3 and 8.2.5 and am seeing the same behavior.

I don't see 10.5 in the build farm list, so I thought I would ask if this is a known issue.

A synopsis:
configure, make and install a fresh postgres and database (configured --with-perl --with-python --with-openssl). This is on my G4 powerbook.
createlang pgperl
attempt to create a perl function, e.g. the perl_max function from the docs (http://www.postgresql.org/docs/8.2/static/plperl-funcs.html): $ cat perlmax.pl.sql CREATE FUNCTION perl_max (integer, integer) RETURNS integer AS $$
    if ($_[0] > $_[1]) { return $_[0]; }
    return $_[1];
$$ LANGUAGE plperl;
$ ~/local/pg-8.3b3/bin/psql -f perlmax.pl.sql test
psql:perlmax.pl.sql:4: ERROR:  null prosrc

there were a few warnings building plperl:

gcc -no-cpp-precomp -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -I. -I../../../src/include -I/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE -c -o plperl.c: In function '_PG_initg:
plperl.c:191: warning: passing argument 4 of 'DefineCustomBoolVariableg from 
incompatible pointer type
plperl.c: In function 'compile_plperl_functiong:
plperl.c:1624: warning: passing argument 4 of 'SysCacheGetAttrg from 
incompatible pointer type
plperl.c:1652: warning: passing argument 4 of 'hash_searchg from incompatible 
pointer type
plperl.c: In function 'plperl_hash_from_tupleg: plperl.c:1685: warning: passing argument 4 of 'nocachegetattrg from incompatible pointer type
plperl.c:1685: warning: passing argument 4 of 'nocachegetattrg from 
incompatible pointer type
plperl.c:1685: warning: passing argument 4 of 'heap_getsysattrg from 
incompatible pointer type
plperl.c:1696: warning: passing argument 3 of 'getTypeOutputInfog from 
incompatible pointer type
plperl.c: In function 'plperl_return_nextg:
plperl.c:1926: warning: passing argument 3 of 'heap_form_tupleg from 
incompatible pointer type
plperl.c: In function 'plperl_spi_prepareg:
plperl.c:2229: warning: passing argument 4 of 'hash_searchg from incompatible 
pointer type

nothing fatal... and a more worrisome warning when linking libperl:

gcc -no-cpp-precomp -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline 
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing  -bundle 
-multiply_defined suppress  plperl.o spi_internal.o SPI.o -L/usr/local/lib 
-L/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE 
-L../../../src/port -arch i386 -arch ppc 
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DynaLoader/DynaLoader.a
 -lperl -ldl -lm -lutil -lc -bundle_loader ../../../src/backend/postgres  -o 
libplperl.0.0.so
ld: warning in ../../../src/backend/postgres, file is not of required 
architecture
ld: warning in plperl.o, file is not of required architecture
ld: warning in spi_internal.o, file is not of required architecture
ld: warning in SPI.o, file is not of required architecture

I don't have terribly much time to figure out the guts of plperl, but would be glad to provide any more information or a login to an OS 10.5 host if that can help...

Thanks for everything,
--
Brandon Maust, Research Consultant
Mullins Lab, University of Washington School of Medicine

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to