Hi Adrian,
> On 26. Sep, 2020, at 17:07, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>
> I believe the issue is here:
>
> select * from pg_pltemplate ;
>
>
> plpythonu | f | f | plpython_call_handler | plpython_inline_handler | plpython_validator |
$libdir/plpython2| NULL
> plpython2u | f | f | plpython2_call_handler | plpython2_inline_handler | plpython2_validator |
$libdir/plpython2| NULL
> plpython3u | f | f | plpython3_call_handler | plpython3_inline_handler | plpython3_validator |
$libdir/plpython3| NULL
>
>
> The default plpython is plpythonu and that points at $libdir/plpython2.
>
> The instructions here:
>
> https://www.postgresql.org/docs/12/plpython-python23.html
>
> offer a work around:
>
> "Daredevils, who want to build a Python-3-only operating system environment, can change the contents of pg_pltemplate
tomake plpythonu be equivalent to plpython3u, keeping in mind that this would make their installation incompatible with
mostof the rest of the world."
sounds like:
update pg_pltemplate
set
tmplhandler='plpython3_call_handler',
tmplinline='plpython3_inline_handler',
tmplvalidator='plpython3_validator',
tmpllibrary='$libdir/plpython3'
where
tmplname='plpythonu';
And that sounds somewhat dangerous to me, especially if I take the comment on the plpython-python23 page into account:
"keepingin mind that this would make their installation incompatible with most of the rest of the world."
I'd rather not...
Cheers,
Paul