Closed df7cb closed 4 years ago
It seems like with Python3 and recent versions of Postgres, the initialization has changed.
The following works:
CREATE EXTENSION plpython3u; CREATE FUNCTION LANGUAGE plpython3u; CREATE EXTENSION MULTICORN;
The following doesn't: CREATE EXTENSION MULTICORN; CREATE EXTENSION plpython3u; CREATE FUNCTION LANGUAGE plpython3u;
For some reason, the second form doesn't initialize plpy as a built in module, probably because the interpreter was initialized by Multicorn and not by plpy.
I have quite an ugly workaround: if on python3, call a function that will check if plpython3 exists, and in that case, force it to load.
There probably were problems before between plpython and Multicorn, so I'm not sure if building this workaround in Multicorn is the best thing, or if it should be manually implemented by the users (making sure that plpython is used BEFORE Multicorn if both of them are going to be used).
I confirm that this (admittedly ugly) patch fixes the problem. Thanks!
I think this broke refreshing materialized views for me because "plpython3u" is not a trusted language and only superusers are allowed to run anonymous block in such languages.
It seems that when I try to refresh a materialized view that is backed by a foreign (multicorn) table the multicorn_check_plpython3u
function ist called in the context of the owner of the materialized view, which in my case is the application user without superuser privileges.
Fixed on master.
Hi,
I'm getting regression failures in write_filesystem when trying to build multicorn on Debian unstable with PG 9.5:
TBH I have no clue what the error means, is that something I need to fix in the package/build system, or is something wrong in multicorn?