PostgreSQL: how to install plpythonu extension

前端 未结 3 1252
走了就别回头了
走了就别回头了 2020-12-31 03:22

I\'m running PostgreSQL 9.3.1 on Ubuntu 12.04.4. I\'d like to use the plpython language extension but I get an error when I try to use it I get:

ERROR: langua

相关标签:
3条回答
  • 2020-12-31 03:42

    I'm running Raspbian 10 (buster) / Linux raspberrypi 4.19.97-v7+ #1294 and ran the following commands to install PL/Python 3 on PostgreSQL 11.7.

    1. Identify which versions are available for install:
    pi@raspberrypi:~/$ sudo apt-cache search ".*plpython3.*"
    postgresql-plpython3-11 - PL/Python 3 procedural language for PostgreSQL 11
    
    1. sudo apt-get install postgresql-contrib postgresql-plpython3-11

    2. sudo su - postgres

    3. psql

    4. CREATE EXTENSION plpython3u;

    5. Verify with command:

    select * from pg_language;
    
    0 讨论(0)
  • 2020-12-31 03:53

    You're using a PostgreSQL package from Bitnami, in /opt. It's not clear if you installed this with apt-get or via an installer script/program, but in either case it's not the same PostgreSQL as what's in the Ubuntu postgresql package.

    Installing postgresql-plpython won't do you any good, because you're installing PL/Python support for a different PostgreSQL install than the one you're actually using.

    You'll need to use the same installation method you originally used to install the Bitnami PostgreSQL to add PL/Python support, if it's available. It might not be provided by Bitnami.

    Otherwise, if you're not too attached to using Bitnami's PostgreSQL, you could use the recommended packages from http://apt.postgresql.org/ .

    0 讨论(0)
  • 2020-12-31 04:00

    for postgres 11.2 (Debian based) I needed to install:

    apt-get update && apt-get install postgresql-plpython3-11
    
    0 讨论(0)
提交回复
热议问题