How to control which Python interpreter Postgres uses?

Поиск
Список
Период
Сортировка
От Ni Ne
Тема How to control which Python interpreter Postgres uses?
Дата
Msg-id CY4PR19MB1160F38876C947812CA2CD63B58A9@CY4PR19MB1160.namprd19.prod.outlook.com
обсуждение исходный текст
Ответы Re: How to control which Python interpreter Postgres uses?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
I have started writing PL/Python scripts on a CentOS 7 box running PG 11. The issue I have is that by default my PG instance wants to use python3.6 instead of version 3.9 which I would prefer. I can see this by running a simple PL/Python script that reports the version of Python being used.

Postgres was installed using yum:

```
$ sudo yum list installed | grep postgres
postgresql11.x86_64                   11.13-1PGDG.rhel7              @pgdg11
postgresql11-libs.x86_64              11.13-1PGDG.rhel7              @pgdg11
postgresql11-plpython3.x86_64         11.13-1PGDG.rhel7              @pgdg11
postgresql11-server.x86_64            11.13-1PGDG.rhel7              @pgdg11
```

I re-created the sym link for /usr/bin/python3 to point to /usr/local/bin/python3.9 however there is no change. It appears that the installation is hard-coded to point to /usr/bin/python3.6 as the Python interpreter.

How can I adjust my postgres settings to tell it which Python interpreter binary to use?

Thanks!

-nine

В списке pgsql-admin по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Know bloat percentage after auto vacuum
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How to control which Python interpreter Postgres uses?