public inbox for [email protected]  
help / color / mirror / Atom feed
From: Adrian Klaver <[email protected]>
To: Sam Son <[email protected]>
To: [email protected]
Subject: Re: Issue with Restore dump with plpythonu, plpython3u installed on postgres16
Date: Tue, 3 Sep 2024 08:16:43 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CACW-z_UwPK8RP68ijs5Frn4+iREOSrN99-KFH6g0v3pFVVF1+w@mail.gmail.com>
References: <CACW-z_UwPK8RP68ijs5Frn4+iREOSrN99-KFH6g0v3pFVVF1+w@mail.gmail.com>

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
[email protected]







reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Issue with Restore dump with plpythonu, plpython3u installed on postgres16
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox