I have a Ubuntu 18.04 with Postgres 10 server running Python 3.5.2, PL/Python function works very well.
How can I upgrade PL/Python to 3.8.0
I used pyenv to install 3.8.0 under user 'postgres', I checked python version already 3.8.0, I even updated /etc/postgresql/10/main/environment to
PYTHONPATH= '/var/lib/postgresql/.pyenv/shims/python3'
But when I run PL/Python function
CREATE FUNCTION ptest ()
RETURNS text
AS $$
import sys
return sys.version
$$ LANGUAGE plpython3u;
The result still 3.5.2