Improve docs for enabling extensions
See original GitHub issueImprove documentation
Link
Describe the problem
The documentation provides an example of how to enable extensions via SQL: create extension pgtap;
However, there seem to be 2 issues with this example:
- In order to ensure that the extension is installed in the
extensions
schema, the statement should becreate extension pgtap with schema extensions
; - Enabling some extensions using the statement above leads to permission issues (e.g.
dblink
,http
,pg_cron
). More specifically:-
The extensions CANNOT be enabled with the
postgres
users, because this leads to the following error:Query 1: ERROR: permission denied to create extension "plpgsql_check" HINT: Must be superuser to create this extension.
-
If the extensions are enabled via the Dashboard query editor (which uses the supabase_admin role), the enabling succeeds, however, other roles (e.g.
postgres
) cannot use the extensions; -
NOTE: this does NOT seem to be a problem with all extensions. For example
pgtap
can be installed with thepostgres
user (which, unlike the extensions listed above as problematic, has NO native code as far as I know);
-
Describe the improvement
I think there need to be 2 improvements addressing both issues above:
- specify the extensions schema in the example;
- document which users to use when enabling extensions OR specify how to enable extensions with supabase_admin and still allow other roles to have access to extensions;
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (8 by maintainers)
@yeganathan18 Added a couple of comments to the patch.
@yeganathan18 go for it 🚀