Byron Servies | 4 Mar 2004 23:02
Favicon

Loading plpgsql in postgres

Hi,

I built postgres from pkgsrc and after adjusting my
kernel parameters it does the basics fine.  Now I
need to add the plpgsql language to it; everything
was built when the database was installed, but
running createlang fails:

$ createlang plpgsql template1
ERROR:  Load of file /usr/pkg/lib/postgresql/plpgsql.so failed: dlopen
(/usr/pkg/lib/postgresql/plpgsql.so) not supported
createlang: language installation failed

Browsing through mail archives seems to indicate that
this means the database cannot find the SPI_* functions
(which are, indeed, undefined in the plpgsql.so lib
as expected) and that there may be a problem with
dlopen.

I would like to know if this is a problem specific to
the cobalt port, or if there is a general issue here.

Can others load this language on x86, or other platforms?

Thanks,

Byron

Hubert Feyrer | 4 Mar 2004 23:19
Picon
Favicon

Re: Loading plpgsql in postgres

On Thu, 4 Mar 2004, Byron Servies wrote:
> $ createlang plpgsql template1
> ERROR:  Load of file /usr/pkg/lib/postgresql/plpgsql.so failed: dlopen
(/usr/pkg/lib/postgresql/plpgsql.so) not supported
> createlang: language installation failed

I'm no postgres guru, but on my toy system, it seems to work:

	miyu% createlang -Uvulab --list vulab
	Procedural languages
	 Name | Trusted?
	------+----------
	(0 rows)

	miyu% createlang -Uvulab adf vulab
	createlang: unsupported language "adf"
	Supported languages are plpgsql, pltcl, pltclu, plperl, plperlu, and
	plpython.
	miyu% createlang -Uvulab plpgsql vulab
	miyu% createlang -Uvulab --list vulab
	Procedural languages
	  Name   | Trusted?
	---------+----------
	 plpgsql | t
	(1 row)

That's on 1.6.2/i386 with the following installed:
	postgresql-lib-7.3.1
	postgresql-client-7.3.1
	postgresql-server-7.3.1nb1
(Continue reading)


Gmane