If you get errors like this:
PG::InsufficientPrivilege: ERROR: permission denied to create extension "btree_gist"
HINT: Must be superuser to create this extension.
You need to install the extension as a user with sufficient rights.
- Open the postgres console as a priviledged user:
sudo -u postgres psql - Afterwards, switch to the databse which needs the extension to be installed:
\connect my_database - Then you can install the extension:
CREATE EXTENSION IF NOT EXISTS btree_gist; - You can verify the extension is installed with
Sample output:
\dxList of installed extensions Name | Version | Schema | Description ------------+---------+------------+----------------------------------------------- btree_gist | 1.5 | public | support for indexing common datatypes in GiST plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
Posted by Judith Roth to Judith's Dev Notes (2023-10-29 18:42)