Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only pgsodium 1.0.0 is available for installation on PostgreSQL 9.6 #34

Open
vitabaks opened this issue Oct 17, 2022 · 3 comments
Open

Comments

@vitabaks
Copy link

Error installing the extension on PostgreSQL 9.6

available version for installation

postgres=# select name, default_version as version, comment from pg_available_extensions where name like '%pgsodium%' order by 1
postgres-# ;
   name   | version |                  comment                   
----------+---------+--------------------------------------------
 pgsodium | 2.0.2   | Postgres extension for libsodium functions
(1 row)

create extension

postgres=# CREATE EXTENSION pgsodium;
ERROR:  could not stat file "/usr/share/postgresql/9.6/extension/pgsodium--2.0.2.sql": No such file or directory

lists the specific extension versions that are available for installation

postgres=# select * from pg_available_extension_versions where name = 'pgsodium' order by version desc;
   name   | version | installed | superuser | relocatable | schema | requires |                  comment                   
----------+---------+-----------+-----------+-------------+--------+----------+--------------------------------------------
 pgsodium | 1.0.0   | f         | t         | t           |        |          | Postgres extension for libsodium functions
(1 row)

we can only install version 1.0.0

postgres=# CREATE EXTENSION pgsodium WITH VERSION '1.0.0';
CREATE EXTENSION
postgres=# \dx
                         List of installed extensions
   Name   | Version |   Schema   |                Description                 
----------+---------+------------+--------------------------------------------
 pgsodium | 1.0.0   | public     | Postgres extension for libsodium functions
 plpgsql  | 1.0     | pg_catalog | PL/pgSQL procedural language
(2 rows)

without the possibility of updating

error:

postgres=# ALTER EXTENSION pgsodium UPDATE;
ERROR:  syntax error at or near "FROM"
LINE 2:    REVOKE ALL ON FUNCTION derive_key FROM PUBLIC;
                                             ^
QUERY:  
			REVOKE ALL ON FUNCTION derive_key FROM PUBLIC;
			GRANT EXECUTE ON FUNCTION derive_key TO pgsodium_keymaker;
		
CONTEXT:  PL/pgSQL function inline_code_block line 29 at EXECUTE

list of extension files

root@6d7ebcea4a6f:/# ls -l /usr/share/postgresql/9.6/extension/ | grep pgsodium
-rw-r--r-- 1 root root    6300 Oct 17 19:18 pgsodium--1.0.0--1.1.0.sql
-rw-r--r-- 1 root root    4606 Oct 17 19:18 pgsodium--1.0.0.sql
-rw-r--r-- 1 root root      59 Oct 17 19:18 pgsodium--1.1.0--1.1.1.sql
-rw-r--r-- 1 root root    6731 Oct 17 19:18 pgsodium--1.1.1--1.2.0.sql
-rw-r--r-- 1 root root    7076 Oct 17 19:18 pgsodium--1.2.0--2.0.0.sql
-rw-r--r-- 1 root root       0 Oct 17 19:18 pgsodium--2.0.0--2.0.1.sql
-rw-r--r-- 1 root root       0 Oct 17 19:18 pgsodium--2.0.1--2.0.2.sql
-rw-r--r-- 1 root root     135 Oct 17 19:18 pgsodium.control
@vitabaks vitabaks changed the title only pgjwt pgsodium 1.0.0 is available for installation on PostgreSQL 9.6 only pgsodium 1.0.0 is available for installation on PostgreSQL 9.6 Oct 17, 2022
@vitabaks
Copy link
Author

To be more precise, it is possible to update the extension to version 1.1.1

postgres=# ALTER EXTENSION pgsodium UPDATE TO '1.1.0';
ALTER EXTENSION
postgres=# \dx
                         List of installed extensions
   Name   | Version |   Schema   |                Description                 
----------+---------+------------+--------------------------------------------
 pgsodium | 1.1.0   | public     | Postgres extension for libsodium functions
 plpgsql  | 1.0     | pg_catalog | PL/pgSQL procedural language
(2 rows)

postgres=# ALTER EXTENSION pgsodium UPDATE TO '1.1.1';
ALTER EXTENSION
postgres=# \dx
                         List of installed extensions
   Name   | Version |   Schema   |                Description                 
----------+---------+------------+--------------------------------------------
 pgsodium | 1.1.1   | public     | Postgres extension for libsodium functions
 plpgsql  | 1.0     | pg_catalog | PL/pgSQL procedural language
(2 rows)

postgres=# ALTER EXTENSION pgsodium UPDATE TO '1.2.0';
ERROR:  syntax error at or near "FROM"
LINE 2:    REVOKE ALL ON FUNCTION derive_key FROM PUBLIC;
                                             ^
QUERY:  
			REVOKE ALL ON FUNCTION derive_key FROM PUBLIC;
			GRANT EXECUTE ON FUNCTION derive_key TO pgsodium_keymaker;
		
CONTEXT:  PL/pgSQL function inline_code_block line 29 at EXECUTE

@vitabaks
Copy link
Author

vitabaks commented Oct 17, 2022

no problem installing the extension on PostgreSQL 10, 11, 12, 13

psql (10.22 (Debian 10.22-1.pgdg110+1))
Type "help" for help.

postgres=# CREATE EXTENSION pgsodium;
CREATE EXTENSION
postgres=# \dx
                               List of installed extensions
   Name   | Version |   Schema   |                       Description                       
----------+---------+------------+---------------------------------------------------------
 pgsodium | 2.0.2   | public     | Pgsodium is a modern cryptography library for Postgres.
 plpgsql  | 1.0     | pg_catalog | PL/pgSQL procedural language
(2 rows)

@vitabaks
Copy link
Author

vitabaks commented Oct 17, 2022

Error installing the pgsodium version 3.0.4 on PostgreSQL 14 and 15 #35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant