跳转到主要内容

wrappers

Supabase提供的外部数据源包装器捆绑包

wrappers · Supabase提供的外部数据源包装器捆绑包

概览

ID扩展软件包版本类别许可证编程语言
8500wrapperswrappers0.6.4FDWApache-2.0Rust
属性可执行文件动态库需要预加载需要建扩展可迁移可信
--s-d-r否是否是是否
关联
相关扩展odbc_fdw multicorn jdbc_fdw
Installed wrappers depend on build features.

软件包

类型仓库版本兼容的 PostgreSQL 大版本包名模式依赖
EXTPIGSTY0.6.419 18 17 16 15wrappers-
RPMPIGSTY0.6.419 18 17 16 15wrappers_$v-
DEBPIGSTY0.6.419 18 17 16 15postgresql-$v-wrappers-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
el8.aarch64N/APIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
el9.x86_64PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
el9.aarch64PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
el10.x86_64PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
el10.aarch64PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
d12.x86_64PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
d12.aarch64PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
d13.x86_64PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
d13.aarch64PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
u22.x86_64PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
u22.aarch64PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
u24.x86_64PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
u24.aarch64PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
u26.x86_64PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
u26.aarch64PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4PIGSTY 0.6.4
软件包版本平台仓库大小下载
wrappers_190.6.4el9.x86_64pigsty44.3 MiBwrappers_19-0.6.4-2PGSTY.el9.x86_64.rpm
wrappers_190.6.4el9.aarch64pigsty40.0 MiBwrappers_19-0.6.4-2PGSTY.el9.aarch64.rpm
wrappers_190.6.4el10.x86_64pigsty45.4 MiBwrappers_19-0.6.4-2PGSTY.el10.x86_64.rpm
wrappers_190.6.4el10.aarch64pigsty40.8 MiBwrappers_19-0.6.4-2PGSTY.el10.aarch64.rpm
postgresql-19-wrappers0.6.4d12.x86_64pigsty29.5 MiBpostgresql-19-wrappers_0.6.4-2PGSTY~bookworm_amd64.deb
postgresql-19-wrappers0.6.4d12.aarch64pigsty25.6 MiBpostgresql-19-wrappers_0.6.4-2PGSTY~bookworm_arm64.deb
postgresql-19-wrappers0.6.4d13.x86_64pigsty30.2 MiBpostgresql-19-wrappers_0.6.4-2PGSTY~trixie_amd64.deb
postgresql-19-wrappers0.6.4d13.aarch64pigsty26.3 MiBpostgresql-19-wrappers_0.6.4-2PGSTY~trixie_arm64.deb
postgresql-19-wrappers0.6.4u22.x86_64pigsty31.9 MiBpostgresql-19-wrappers_0.6.4-2PGSTY~jammy_amd64.deb
postgresql-19-wrappers0.6.4u22.aarch64pigsty28.2 MiBpostgresql-19-wrappers_0.6.4-2PGSTY~jammy_arm64.deb
postgresql-19-wrappers0.6.4u24.x86_64pigsty32.3 MiBpostgresql-19-wrappers_0.6.4-2PGSTY~noble_amd64.deb
postgresql-19-wrappers0.6.4u24.aarch64pigsty28.4 MiBpostgresql-19-wrappers_0.6.4-2PGSTY~noble_arm64.deb
postgresql-19-wrappers0.6.4u26.x86_64pigsty32.7 MiBpostgresql-19-wrappers_0.6.4-2PGSTY~resolute_amd64.deb
postgresql-19-wrappers0.6.4u26.aarch64pigsty28.5 MiBpostgresql-19-wrappers_0.6.4-2PGSTY~resolute_arm64.deb
软件包版本平台仓库大小下载
wrappers_180.6.4el8.x86_64pigsty36.1 MiBwrappers_18-0.6.4-1PGSTY.el8.x86_64.rpm
wrappers_180.6.4el8.aarch64pigsty32.7 MiBwrappers_18-0.6.4-1PGSTY.el8.aarch64.rpm
wrappers_180.6.4el9.x86_64pigsty44.3 MiBwrappers_18-0.6.4-2PGSTY.el9.x86_64.rpm
wrappers_180.6.4el9.aarch64pigsty40.2 MiBwrappers_18-0.6.4-2PGSTY.el9.aarch64.rpm
wrappers_180.6.4el10.x86_64pigsty45.4 MiBwrappers_18-0.6.4-2PGSTY.el10.x86_64.rpm
wrappers_180.6.4el10.aarch64pigsty40.9 MiBwrappers_18-0.6.4-2PGSTY.el10.aarch64.rpm
postgresql-18-wrappers0.6.4d12.x86_64pigsty29.5 MiBpostgresql-18-wrappers_0.6.4-2PGSTY~bookworm_amd64.deb
postgresql-18-wrappers0.6.4d12.aarch64pigsty25.6 MiBpostgresql-18-wrappers_0.6.4-2PGSTY~bookworm_arm64.deb
postgresql-18-wrappers0.6.4d13.x86_64pigsty30.3 MiBpostgresql-18-wrappers_0.6.4-2PGSTY~trixie_amd64.deb
postgresql-18-wrappers0.6.4d13.aarch64pigsty26.3 MiBpostgresql-18-wrappers_0.6.4-2PGSTY~trixie_arm64.deb
postgresql-18-wrappers0.6.4u22.x86_64pigsty31.9 MiBpostgresql-18-wrappers_0.6.4-2PGSTY~jammy_amd64.deb
postgresql-18-wrappers0.6.4u22.aarch64pigsty28.2 MiBpostgresql-18-wrappers_0.6.4-2PGSTY~jammy_arm64.deb
postgresql-18-wrappers0.6.4u24.x86_64pigsty32.3 MiBpostgresql-18-wrappers_0.6.4-2PGSTY~noble_amd64.deb
postgresql-18-wrappers0.6.4u24.aarch64pigsty28.4 MiBpostgresql-18-wrappers_0.6.4-2PGSTY~noble_arm64.deb
postgresql-18-wrappers0.6.4u26.x86_64pigsty32.7 MiBpostgresql-18-wrappers_0.6.4-2PGSTY~resolute_amd64.deb
postgresql-18-wrappers0.6.4u26.aarch64pigsty28.5 MiBpostgresql-18-wrappers_0.6.4-2PGSTY~resolute_arm64.deb
软件包版本平台仓库大小下载
wrappers_170.6.4el8.x86_64pigsty36.1 MiBwrappers_17-0.6.4-1PGSTY.el8.x86_64.rpm
wrappers_170.6.4el8.aarch64pigsty32.7 MiBwrappers_17-0.6.4-1PGSTY.el8.aarch64.rpm
wrappers_170.6.4el9.x86_64pigsty44.3 MiBwrappers_17-0.6.4-2PGSTY.el9.x86_64.rpm
wrappers_170.6.4el9.aarch64pigsty40.2 MiBwrappers_17-0.6.4-2PGSTY.el9.aarch64.rpm
wrappers_170.6.4el10.x86_64pigsty45.4 MiBwrappers_17-0.6.4-2PGSTY.el10.x86_64.rpm
wrappers_170.6.4el10.aarch64pigsty41.0 MiBwrappers_17-0.6.4-2PGSTY.el10.aarch64.rpm
postgresql-17-wrappers0.6.4d12.x86_64pigsty29.5 MiBpostgresql-17-wrappers_0.6.4-2PGSTY~bookworm_amd64.deb
postgresql-17-wrappers0.6.4d12.aarch64pigsty25.6 MiBpostgresql-17-wrappers_0.6.4-2PGSTY~bookworm_arm64.deb
postgresql-17-wrappers0.6.4d13.x86_64pigsty30.3 MiBpostgresql-17-wrappers_0.6.4-2PGSTY~trixie_amd64.deb
postgresql-17-wrappers0.6.4d13.aarch64pigsty26.3 MiBpostgresql-17-wrappers_0.6.4-2PGSTY~trixie_arm64.deb
postgresql-17-wrappers0.6.4u22.x86_64pigsty32.0 MiBpostgresql-17-wrappers_0.6.4-2PGSTY~jammy_amd64.deb
postgresql-17-wrappers0.6.4u22.aarch64pigsty28.2 MiBpostgresql-17-wrappers_0.6.4-2PGSTY~jammy_arm64.deb
postgresql-17-wrappers0.6.4u24.x86_64pigsty32.4 MiBpostgresql-17-wrappers_0.6.4-2PGSTY~noble_amd64.deb
postgresql-17-wrappers0.6.4u24.aarch64pigsty28.4 MiBpostgresql-17-wrappers_0.6.4-2PGSTY~noble_arm64.deb
postgresql-17-wrappers0.6.4u26.x86_64pigsty32.7 MiBpostgresql-17-wrappers_0.6.4-2PGSTY~resolute_amd64.deb
postgresql-17-wrappers0.6.4u26.aarch64pigsty28.5 MiBpostgresql-17-wrappers_0.6.4-2PGSTY~resolute_arm64.deb
软件包版本平台仓库大小下载
wrappers_160.6.4el8.x86_64pigsty36.1 MiBwrappers_16-0.6.4-1PGSTY.el8.x86_64.rpm
wrappers_160.6.4el8.aarch64pigsty32.7 MiBwrappers_16-0.6.4-1PGSTY.el8.aarch64.rpm
wrappers_160.6.4el9.x86_64pigsty44.3 MiBwrappers_16-0.6.4-2PGSTY.el9.x86_64.rpm
wrappers_160.6.4el9.aarch64pigsty40.2 MiBwrappers_16-0.6.4-2PGSTY.el9.aarch64.rpm
wrappers_160.6.4el10.x86_64pigsty45.4 MiBwrappers_16-0.6.4-2PGSTY.el10.x86_64.rpm
wrappers_160.6.4el10.aarch64pigsty41.0 MiBwrappers_16-0.6.4-2PGSTY.el10.aarch64.rpm
postgresql-16-wrappers0.6.4d12.x86_64pigsty29.5 MiBpostgresql-16-wrappers_0.6.4-2PGSTY~bookworm_amd64.deb
postgresql-16-wrappers0.6.4d12.aarch64pigsty25.6 MiBpostgresql-16-wrappers_0.6.4-2PGSTY~bookworm_arm64.deb
postgresql-16-wrappers0.6.4d13.x86_64pigsty30.3 MiBpostgresql-16-wrappers_0.6.4-2PGSTY~trixie_amd64.deb
postgresql-16-wrappers0.6.4d13.aarch64pigsty26.3 MiBpostgresql-16-wrappers_0.6.4-2PGSTY~trixie_arm64.deb
postgresql-16-wrappers0.6.4u22.x86_64pigsty32.0 MiBpostgresql-16-wrappers_0.6.4-2PGSTY~jammy_amd64.deb
postgresql-16-wrappers0.6.4u22.aarch64pigsty28.2 MiBpostgresql-16-wrappers_0.6.4-2PGSTY~jammy_arm64.deb
postgresql-16-wrappers0.6.4u24.x86_64pigsty32.4 MiBpostgresql-16-wrappers_0.6.4-2PGSTY~noble_amd64.deb
postgresql-16-wrappers0.6.4u24.aarch64pigsty28.4 MiBpostgresql-16-wrappers_0.6.4-2PGSTY~noble_arm64.deb
postgresql-16-wrappers0.6.4u26.x86_64pigsty32.7 MiBpostgresql-16-wrappers_0.6.4-2PGSTY~resolute_amd64.deb
postgresql-16-wrappers0.6.4u26.aarch64pigsty28.5 MiBpostgresql-16-wrappers_0.6.4-2PGSTY~resolute_arm64.deb
软件包版本平台仓库大小下载
wrappers_150.6.4el8.x86_64pigsty36.1 MiBwrappers_15-0.6.4-1PGSTY.el8.x86_64.rpm
wrappers_150.6.4el8.aarch64pigsty32.7 MiBwrappers_15-0.6.4-1PGSTY.el8.aarch64.rpm
wrappers_150.6.4el9.x86_64pigsty44.4 MiBwrappers_15-0.6.4-2PGSTY.el9.x86_64.rpm
wrappers_150.6.4el9.aarch64pigsty40.1 MiBwrappers_15-0.6.4-2PGSTY.el9.aarch64.rpm
wrappers_150.6.4el10.x86_64pigsty45.5 MiBwrappers_15-0.6.4-2PGSTY.el10.x86_64.rpm
wrappers_150.6.4el10.aarch64pigsty40.9 MiBwrappers_15-0.6.4-2PGSTY.el10.aarch64.rpm
postgresql-15-wrappers0.6.4d12.x86_64pigsty29.5 MiBpostgresql-15-wrappers_0.6.4-2PGSTY~bookworm_amd64.deb
postgresql-15-wrappers0.6.4d12.aarch64pigsty25.7 MiBpostgresql-15-wrappers_0.6.4-2PGSTY~bookworm_arm64.deb
postgresql-15-wrappers0.6.4d13.x86_64pigsty30.3 MiBpostgresql-15-wrappers_0.6.4-2PGSTY~trixie_amd64.deb
postgresql-15-wrappers0.6.4d13.aarch64pigsty26.4 MiBpostgresql-15-wrappers_0.6.4-2PGSTY~trixie_arm64.deb
postgresql-15-wrappers0.6.4u22.x86_64pigsty32.0 MiBpostgresql-15-wrappers_0.6.4-2PGSTY~jammy_amd64.deb
postgresql-15-wrappers0.6.4u22.aarch64pigsty28.2 MiBpostgresql-15-wrappers_0.6.4-2PGSTY~jammy_arm64.deb
postgresql-15-wrappers0.6.4u24.x86_64pigsty32.3 MiBpostgresql-15-wrappers_0.6.4-2PGSTY~noble_amd64.deb
postgresql-15-wrappers0.6.4u24.aarch64pigsty28.4 MiBpostgresql-15-wrappers_0.6.4-2PGSTY~noble_arm64.deb
postgresql-15-wrappers0.6.4u26.x86_64pigsty32.7 MiBpostgresql-15-wrappers_0.6.4-2PGSTY~resolute_amd64.deb
postgresql-15-wrappers0.6.4u26.aarch64pigsty28.5 MiBpostgresql-15-wrappers_0.6.4-2PGSTY~resolute_arm64.deb

源码

pig build pkg wrappers;		# build rpm/deb

安装

启用 PGDG 和 PIGSTY 仓库并更新缓存。

pig repo add pgsql -u   # add both repo and update cache

使用 pig 安装扩展。

pig install wrappers;		# install by package name

pig install wrappers -v 19;   # install for PG 19
pig install wrappers -v 18;   # install for PG 18
pig install wrappers -v 17;   # install for PG 17
pig install wrappers -v 16;   # install for PG 16
pig install wrappers -v 15;   # install for PG 15

在数据库中创建扩展。

CREATE EXTENSION wrappers;

用法

来源:

wrappers 是一个用 Rust 编写的 PostgreSQL 外部数据封装框架,同时也是一系列由 Supabase 维护的 FDWs 的打包集合。安装一个扩展即可实现多种封装器的实现,每个外部服务器可以选择它需要的具体封装器类型。

CREATE EXTENSION wrappers;

通常的工作流程

为一个封装器创建一个服务器,然后通过外部表暴露远程数据:

CREATE SERVER stripe_server
  FOREIGN DATA WRAPPER stripe_wrapper
  OPTIONS (
    api_key_id 'stripe_api_key',
    api_url 'https://api.stripe.com/v1/'
  );

CREATE FOREIGN TABLE stripe_customers (
  id text,
  email text,
  name text,
  description text,
  created timestamp,
  attrs jsonb
)
  SERVER stripe_server
  OPTIONS (
    object 'customers',
    rowid_column 'id'
  );

包含的内容

上游版本提供了对 BigQuery、ClickHouse、DuckDB、DynamoDB、MySQL/Doris、Redis、S3、S3 Vectors、Stripe、Snowflake、Slack、Notion、OpenAPI、Infura 等数据库和服务的封装器。读写支持因封装器而异,但 WHERE、ORDER BY 和 LIMIT 的下推是框架的核心功能。

版本 0.6.2

v0.6.2 版本保持了相同的扩展模型,并增加了以下内容:

  • MongoDB FDW 支持读写操作
  • 在 WASM 封装器中使用会话变量凭证进行每次请求的身份验证
  • OpenAPI FDW 的 RFC 8288 Link 头部分页支持
  • 运行时、依赖和封装器特定的修复,详情参见发布说明

每个封装器的具体页面仍然是服务器选项、外部表列、下推和支持写操作的权威来源。

注意事项

  • 封装器特定的选项、支持的对象以及写操作因封装器而异;请查阅官方目录页面以获取您使用的具体 FDW 的确切信息。
  • 文档警告说,当物化视图依赖外部表时,逻辑恢复可能会失败,请避免这种模式或依赖于物理备份。
  • 外部表本身不提供安全边界。请将它们保留在私有模式中,并谨慎授予访问权限,使用可用的最小特权远程凭证,并对暴露或缓存远程数据的本地表应用行级安全性。
  • 请将 API 密钥和令牌存储在支持的秘密存储中或每次请求的凭据机制中,而不是将其嵌入到版本控制系统中的 SQL 中。

0.6.4 更新

0.6.4 将内嵌 DuckDB 更新到 1.5.6,并修复 Shopify/Paddle 的 WASM 接口定义。上游 Cargo 清单提供 PostgreSQL 13–18 目标并使用 pgrx 0.19.2;打包构建选择可能不同。实际可用的封装器取决于启用的构建特性。应使用匹配的动态库和 SQL 文件升级扩展,修改服务器选项前核对具体封装器文档。

表格阅读器