On 9/2/24 04:37, Sam Son wrote:
> Hi Team,
>
> I am working on a project where we have applications run on old versions
> of postgres, we are using *plpythonu* in all Functions extension,
What versions of Postgres?
>
> Now we have upgraded postgres to latest which does not support plpythonu
> anymore, So we are facing an issue while restoring dump which has
> plpythonu, but latest postgres support only plpython3u.
The best way I found to do this is install plpython3u in the old
versions and convert your plpythonu functions to use plpython3u. Then
you can drop plpythonu and do the dump/restore. This will also make you
deal with the fact that Python2 != Python3 and your functions may need
Python related changes as well.
>
> *"pg_restore: error: could not execute query: ERROR: language
> "plpythonu" does not exist"*
>
> How to change plpythonu to plpython3u in the dump file before
> pg_restore. or Does postgres have any option to handle directly via config.
>
> Thanks in Advance
>
> Thanks,
> Samson G
--
Adrian Klaver
adrian.klaver@aklaver.com