supabase / supautils

PostgreSQL extension that secures a cluster on a cloud environment
https://supabase.github.io/supautils
Apache License 2.0
59 stars 13 forks source link

feat: extensions parameter overrides #76

Closed soedirgo closed 9 months ago

soedirgo commented 9 months ago

Allows overriding create extension parameters. E.g. with:

supautils.extensions_parameter_overrides = '{"pg_cron":{"schema":"pg_catalog"}}'

When someone runs create extension pg_cron with schema public, it gets created in pg_catalog instead:

postgres=> \dx
                 List of installed extensions
  Name   | Version |   Schema   |         Description          
---------+---------+------------+------------------------------
 pg_cron | 1.5     | pg_catalog | Job scheduler for PostgreSQL
 plpgsql | 1.0     | pg_catalog | PL/pgSQL procedural language
(2 rows)

Currently only supports schema, but may support version, owner, etc. in the future.