On Tue, Sep 23, 2014 at 11:05 AM, Nick Guenther <
nguenthe@uwaterloo.ca> wrote:
> I've struggled with plpython on OpenBSD 5.5-amd64 as well. Could it be related? Maybe the amount of dependencies python pulls in gets overwhelming and things break?
>
>
> $ psql -h localhost -d postgres
> psql (9.3.2)
> Type "help" for help.
> postgres=# create language plpython2u;
> ERROR: could not load library "/usr/local/lib/postgresql/plpython2.so": dlopen (/usr/local/lib/postgresql/plpython2.so) failed: Cannot load specified object
> postgres=# create language plperl;
> CREATE LANGUAGE
> postgres=#
>
>
> This is strange because /usr/local/lib/postgresql/plpython2.so exists. Also, perl loads fine.
> $ ls -l /usr/local/lib/postgresql/pl*
> -rwxr-xr-x 1 root bin 100948 Jul 31 02:05 /usr/local/lib/postgresql/plperl.so
> -rwxr-xr-x 1 root bin 181287 Jul 31 02:05 /usr/local/lib/postgresql/plpgsql.so
> -rwxr-xr-x 1 root bin 137951 Mar 4 12:45 /usr/local/lib/postgresql/plpython2.so
>
Hmmm... I doubt that this is directly related to the Windows issue, where the shared library simply doesn't exist in the standard installation.
Can anyone confirm whether the plpython2 omission from the Windows builds was intentional? If it is intentional, then a few simple changes would make it easier for users like me to figure out that it's missing, not just misconfigured:
* Make plpythonu point to plpython3u, rather than plpython2u, by default
* Omit plpython2u from the pg_pltemplate catalog, so that this:
CREATE LANGUAGE plpython2u
... would give a more helpful error message:
ERROR: unsupported language "plpython2u"
-Dan