Re: testing plpython3u on 9.0beta2 - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: testing plpython3u on 9.0beta2
Date
Msg-id 1277445467.28123.7.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: testing plpython3u on 9.0beta2  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: testing plpython3u on 9.0beta2  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On ons, 2010-06-23 at 07:17 -0400, Robert Haas wrote:
> I can reproduce this, here.  The problem seems to be that plpython
> only build either plpython2.so or plython3.so, but both languages
> expect a call handler called plython_call_handler.  So once we load
> the shared library for one language, the other language just grabs the
> same call handler.

The problem is apparently that when CREATE LANGUAGE creates a language
from a pg_pltemplate entry, it creates the proname from the tmplhandler
name, and if it finds a fitting proname entry already, it used that one.
So when you create plpython2 first and plpython3 second, the pg_language
entries of the latter point to the pg_proc entries of the former.

If you fix that up manually (create additional pg_proc entries and fix
the pg_language entries to point there), it works better.




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Add TCP keepalive support to libpq.
Next
From: Robert Haas
Date:
Subject: Re: [COMMITTERS] pgsql: Add TCP keepalive support to libpq.