pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Förster <paul.foerster@gmail.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: pg_upgrade Python version issue on openSUSE
Date: Sat, 26 Sep 2020 17:21:16 +0200
Message-ID: <AF93DB46-A1A6-456A-A195-12F8501FE46B@gmail.com> (raw)
In-Reply-To: <bd539adf-a0ed-2d5d-f471-b47e73dd4517@aklaver.com>
References: <553A044A-D0E3-475D-8DC0-5845381CB086@gmail.com>
	<1FB046FC-BE42-4D66-B0AE-E94B6CB9498E@gmail.com>
	<06317862-1908-48C7-8766-F6D1B4BFEB9F@gmail.com>
	<1990004.1601129252@sss.pgh.pa.us>
	<9D64B513-77D4-41D9-87E5-0727FAF96C84@gmail.com>
	<1999120.1601131766@sss.pgh.pa.us>
	<bd539adf-a0ed-2d5d-f471-b47e73dd4517@aklaver.com>

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 to make plpythonu be equivalent to plpython3u, keeping in mind that this would make their installation incompatible with most of 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: "keeping in mind that this would make their installation incompatible with most of the rest of the world."

I'd rather not...

Cheers,
Paul




view thread (28+ messages)  latest in thread

Message-ID: <AF93DB46-A1A6-456A-A195-12F8501FE46B@gmail.com>
Permalink:  ../AF93DB46-A1A6-456A-A195-12F8501FE46B@gmail.com/
Also on:    postgresql.org/message-id/AF93DB46-A1A6-456A-A195-12F8501FE46B@gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: paul.foerster@gmail.com, adrian.klaver@aklaver.com, tgl@sss.pgh.pa.us
  Subject: Re: pg_upgrade Python version issue on openSUSE
  In-Reply-To: <AF93DB46-A1A6-456A-A195-12F8501FE46B@gmail.com>
  References: <553A044A-D0E3-475D-8DC0-5845381CB086@gmail.com> <1FB046FC-BE42-4D66-B0AE-E94B6CB9498E@gmail.com> <06317862-1908-48C7-8766-F6D1B4BFEB9F@gmail.com> <1990004.1601129252@sss.pgh.pa.us> <9D64B513-77D4-41D9-87E5-0727FAF96C84@gmail.com> <1999120.1601131766@sss.pgh.pa.us> <bd539adf-a0ed-2d5d-f471-b47e73dd4517@aklaver.com> <AF93DB46-A1A6-456A-A195-12F8501FE46B@gmail.com>

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

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