Postgres 扩展概览
扩展就像它们的名字一样——它们通过添加 Postgres 核心没有的功能来“扩展”数据库。Supabase 已经预先安装了一些最有用的开源扩展。
🌐 Extensions are exactly as they sound - they "extend" the database with functionality which isn't part of the Postgres core. Supabase has pre-installed some of the most useful open source extensions.
启用和禁用扩展 #
🌐 Enable and disable extensions
- 在仪表板中转到数据库页面。
- 在侧边栏中点击 扩展。
- 启用或禁用扩展程序。
大多数扩展都安装在 extensions 模式下,默认情况下 public 可以访问。为了避免命名空间污染,我们不建议在 extensions 模式中创建其他实体。
🌐 Most extensions are installed under the extensions schema, which is accessible to public by default. To avoid namespace pollution, we do not recommend creating other entities in the extensions schema.
如果你需要限制用户对扩展管理的表的访问,我们建议为安装该特定扩展创建一个单独的模式。
🌐 If you need to restrict user access to tables managed by extensions, we recommend creating a separate schema for installing that specific extension.
有些扩展只能在特定的模式下创建,例如,postgis_tiger_geocoder 扩展会创建一个名为 tiger 的模式。在启用这些扩展之前,确保你没有创建同名的冲突模式。
🌐 Some extensions can only be created under a specific schema, for example, postgis_tiger_geocoder extension creates a schema named tiger. Before enabling such extensions, make sure you have not created a conflicting schema with the same name.
除了预配置的扩展,你还可以直接在数据库中使用 Supabase 的 SQL 编辑器安装自己想要的 SQL 扩展。包括 plpgsql 扩展在内的扩展 SQL 代码,都可以通过 SQL 编辑器添加。
🌐 In addition to the pre-configured extensions, you can also install your own SQL extensions directly in the database using Supabase's SQL editor. The SQL code for the extensions, including plpgsql extensions, can be added through the SQL editor.
升级扩展 #
🌐 Upgrade extensions
如果 Supabase 上有扩展的新版本可用,你需要在 基础设施设置 中发起软件升级以访问它。你也可以通过在 常规设置 中重启服务器来发起软件升级。
🌐 If a new version of an extension becomes available on Supabase, you need to initiate a software upgrade in the Infrastructure Settings to access it. Software upgrades can also be initiated by restarting your server in the General Settings.
完整扩展列表 #
🌐 Full list of extensions
Supabase 已经预配置了 50 多个扩展,你也可以通过 database.dev 包管理器安装其他扩展。
🌐 Supabase is pre-configured with over 50 extensions and you can install additional extensions through the database.dev package manager.
你可以直接在数据库里用 SQL 编辑器或任何 Postgres 客户端安装纯 SQL 扩展。
🌐 You can install pure SQL extensions directly in the database using the SQL editor or any Postgres client.
如果你想请求延期,可以在GitHub 讨论中添加(或点赞)它。
🌐 If you would like to request an extension, add (or upvote) it in the GitHub Discussion.