Skip to content

Instantly share code, notes, and snippets.

@judell
Last active December 19, 2019 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save judell/7863e9f9ff8a1200ba4dda563f37485d to your computer and use it in GitHub Desktop.
Save judell/7863e9f9ff8a1200ba4dda563f37485d to your computer and use it in GitHub Desktop.

Installed extensions

h_analytics=# select name, default_version, installed_version from pg_available_extensions  where installed_version is not null;
   name    | default_version | installed_version
-----------+-----------------+-------------------
 uuid-ossp | 1.1             | 1.1
 plpgsql   | 1.0             | 1.0
(2 rows)

Try to create plpython extension

h_analytics=# create extension plpythonu;

ERROR: could not open extension control file "/usr/share/postgresql/11/extension/plpythonu.control": No such file or directory

Is the library installed?

Well, I installed what I thought was the right library.

$ postgres@analytics:/data/home/judell$ apt list --installed | grep plpy

postgresql-plpython3-11/bionic-pgdg,now 11.6-1.pgdg18.04+1 amd64 [installed]

Remove library and retry?

$ judell@analytics:~$ sudo apt-get remove postgresql-plpython3

Reading package lists... Done
Building dependency tree
Reading state information... Done
Virtual packages like 'postgresql-plpython3' can't be removed
The following packages were automatically installed and are no longer required:
  linux-aws-headers-4.15.0-1045 linux-aws-headers-4.15.0-1047
  linux-aws-headers-4.15.0-1048 linux-aws-headers-4.15.0-1050
  linux-aws-headers-4.15.0-1052
Use 'sudo apt autoremove' to remove them.

$ judell@analytics:~$ sudo apt-get autoremove postgresql-plpython3

Reading package lists... Done
Building dependency tree
Reading state information... Done
Virtual packages like 'postgresql-plpython3' can't be removed
The following packages will be REMOVED:
  linux-aws-headers-4.15.0-1045 linux-aws-headers-4.15.0-1047
  linux-aws-headers-4.15.0-1048 linux-aws-headers-4.15.0-1050
  linux-aws-headers-4.15.0-1052
0 upgraded, 0 newly installed, 5 to remove and 67 not upgraded.
After this operation, 389 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 236899 files and directories currently installed.)
Removing linux-aws-headers-4.15.0-1045 (4.15.0-1045.47) ...
Removing linux-aws-headers-4.15.0-1047 (4.15.0-1047.49) ...
Removing linux-aws-headers-4.15.0-1048 (4.15.0-1048.50) ...
Removing linux-aws-headers-4.15.0-1050 (4.15.0-1050.52) ...
Removing linux-aws-headers-4.15.0-1052 (4.15.0-1052.54) ...

$ judell@analytics:~$ apt list --installed | grep plpy

postgresql-plpython3-11/bionic-pgdg,now 11.6-1.pgdg18.04+1 amd64 [installed]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment