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 pgjwt version 0.1.1 is available for installation on PostgreSQL 9.6 #23

Open
vitabaks opened this issue Oct 17, 2022 · 1 comment

Comments

@vitabaks
Copy link

Error installing pgjwt 0.2.0 the extension on PostgreSQL 9.6

postgres=# CREATE EXTENSION pgjwt;
ERROR:  required extension "pgcrypto" is not installed
HINT:  Use CREATE EXTENSION ... CASCADE to install required extensions too.
postgres=# CREATE EXTENSION pgjwt CASCADE;
NOTICE:  installing required extension "pgcrypto"
ERROR:  could not stat file "/usr/share/postgresql/9.6/extension/pgjwt--0.2.0.sql": No such file or directory
postgres=# \dx
                 List of installed extensions
  Name   | Version |   Schema   |         Description          
---------+---------+------------+------------------------------
 plpgsql | 1.0     | pg_catalog | PL/pgSQL procedural language
(1 row)

postgres=# select name, default_version as version, comment from pg_available_extensions where name like '%pgjwt%' order by 1;
 name  | version |              comment              
-------+---------+-----------------------------------
 pgjwt | 0.2.0   | JSON Web Token API for Postgresql
(1 row)
-rw-r--r-- 1 root root    2123 Oct 17 17:49 pgjwt--0.1.0--0.1.1.sql
-rw-r--r-- 1 root root    1010 Oct 17 17:49 pgjwt--0.1.1--0.2.0.sql
-rw-r--r-- 1 root root    2123 Oct 17 17:49 pgjwt--0.1.1.sql
-rw-r--r-- 1 root root     148 Oct 17 17:49 pgjwt.control
root@ebb360ee2127:/# 

Although there is a file "pgjwt--0.1.1--0.2.0.sql", we can only install version 0.1.1

lists the specific extension versions that are available for installation.

postgres=# select * from pg_available_extension_versions where name = 'pgjwt' order by version desc;
 name  | version | installed | superuser | relocatable | schema |  requires  |              comment              
-------+---------+-----------+-----------+-------------+--------+------------+-----------------------------------
 pgjwt | 0.1.1   | f         | f         | f           |        | {pgcrypto} | JSON Web Token API for Postgresql
(1 row)
postgres=# CREATE EXTENSION pgjwt WITH VERSION '0.1.1' CASCADE;
NOTICE:  installing required extension "pgcrypto"
CREATE EXTENSION
postgres=# \dx
                    List of installed extensions
   Name   | Version |   Schema   |            Description            
----------+---------+------------+-----------------------------------
 pgcrypto | 1.3     | public     | cryptographic functions
 pgjwt    | 0.1.1   | public     | JSON Web Token API for Postgresql
 plpgsql  | 1.0     | pg_catalog | PL/pgSQL procedural language
(3 rows)

And we can update the extension to version 0.2.0

postgres=# ALTER EXTENSION pgjwt UPDATE ;
ALTER EXTENSION
postgres=# \dx
                    List of installed extensions
   Name   | Version |   Schema   |            Description            
----------+---------+------------+-----------------------------------
 pgcrypto | 1.3     | public     | cryptographic functions
 pgjwt    | 0.2.0   | public     | JSON Web Token API for Postgresql
 plpgsql  | 1.0     | pg_catalog | PL/pgSQL procedural language
(3 rows)

I expect there will be an option to install the latest version with the command CREATE EXTENSION pgjwt;

@vitabaks
Copy link
Author

vitabaks commented Oct 17, 2022

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

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

postgres=# CREATE EXTENSION pgjwt CASCADE;
NOTICE:  installing required extension "pgcrypto"
CREATE EXTENSION
postgres=# \dx
                    List of installed extensions
   Name   | Version |   Schema   |            Description            
----------+---------+------------+-----------------------------------
 pgcrypto | 1.3     | public     | cryptographic functions
 pgjwt    | 0.2.0   | public     | JSON Web Token API for Postgresql
 plpgsql  | 1.0     | pg_catalog | PL/pgSQL procedural language
(3 rows)
psql (15.0 (Debian 15.0-1.pgdg110+1))
Type "help" for help.

postgres=# CREATE EXTENSION pgjwt CASCADE;
NOTICE:  installing required extension "pgcrypto"
CREATE EXTENSION
postgres=# \dx
                    List of installed extensions
   Name   | Version |   Schema   |            Description            
----------+---------+------------+-----------------------------------
 pgcrypto | 1.3     | public     | cryptographic functions
 pgjwt    | 0.2.0   | public     | JSON Web Token API for Postgresql
 plpgsql  | 1.0     | pg_catalog | PL/pgSQL procedural language
(3 rows)

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